Skip to content

CLI-generated form doesn't keep the type attribute from the model #102

@e2jk

Description

@e2jk

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions