Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 of 5 tasks
E-Fir opened this issue Nov 8, 2022 · 0 comments · May be fixed by #334
Open
3 of 5 tasks

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

E-Fir opened this issue Nov 8, 2022 · 0 comments · May be fixed by #334

Comments

@E-Fir
Copy link

E-Fir commented Nov 8, 2022

Describe the bug

which template:

  • MaterialDesignFrameworkModule — Material Design
  • Bootstrap3FrameworkModule — Bootstrap 3
  • Bootstrap4FrameworkModule — Bootstrap 4
  • NoFrameworkModule — plain HTML
  • Other (please specify below)

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):

  • OS: Windows 10.0.19041.1806
  • Browser: Firefox
  • Version: 106.0.5 (64-bit)

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

E-Fir added a commit to logiceditor-com/ajsf that referenced this issue Nov 8, 2022
…conform HTML behaviour

use empty string instead of null for non required empty values to conform HTML behaviour
Fixes hamzahamidi#333
E-Fir added a commit to logiceditor-com/ajsf that referenced this issue Nov 8, 2022
… values in enum fromControl-s

force formControl value to empty string when it's null and if the control has enum
Fixes hamzahamidi#333
@E-Fir E-Fir linked a pull request Nov 8, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant