ampersand
ampersand copied to clipboard
CLI-generated form doesn't keep the `type` attribute from the model
A model containing this props
(extract):
numberOfRecords: ['number', false, '']
generates the following form by calling $ ampersand gen form client/models/object.js
(extract)
new InputView({
label: "Number Of Records",
name: "numberOfRecords",
value: this.model.numberOfRecords || "",
required: false,
placeholder: "Number Of Records",
parent: this
})
The dataType is defined as "number" in the model, the form needs a corresponding type: 'number'
.
I suppose changes need to be done to lib/gen-types/form.js
and lib/templates/input.js
, please advise.