Skip to content

fix the logic for default value for Select component #194

@stevehu

Description

@stevehu

The default value defined in the schema can not be displayed in the enum string filed on the form.

After the fix, the logic for the default value calculation in the constructor.

  1. default value should be started with [] or "" depends on if it is multiple or singular.
  2. if form.default is defined, then use it, otherwise, use the form.schema.default instead.
  3. check if the model has a value and overwrite the default value for the currentValue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions