fix the logic for default value for Select component
Closed this issue · 0 comments
stevehu commented
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.
- default value should be started with [] or "" depends on if it is multiple or singular.
- if form.default is defined, then use it, otherwise, use the form.schema.default instead.
- check if the model has a value and overwrite the default value for the currentValue.