hamzahamidi / ajsf

Angular JSON Schema Form
https://hamzahamidi.github.io/ajsf
MIT License
358 stars 182 forks source link

The `None` item in enum dropdown lists considered as `"null"` #333

Open E-Fir opened 1 year ago

E-Fir commented 1 year ago

Describe the bug

which template:

Selecting any item in the enum drop-down list and then returning to the None item causes the bound variable to be set to "null" instead of unset it.

To Reproduce

  1. open the Demonstration Playground
  2. choose the "Bootstrap 3" framework
  3. choose the "Angular Schema Form/Kitchen Sink" example
  4. enter something to the "Name" field
  5. select the "undefined" item and check that the favorite field is appeared in the live data
  6. select the "None" item and check that the favorite field doesn't hide and set to "null"
  7. check the same with "Bootstrap 4" framework and without framework. The results are the same.

Expected behavior

The favorite field is removed from the data as in the case of the "Materials" framework.

Desktop (please complete the following information):

Log output covering before error and any error statements

none

Additional context

none

Context

Can't differentiate null value and no value. It's a bug.

Possible Implementation

334