- Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Description
Prerequisites
- I have read the documentation;
- In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.
- Ideally, I'm providing a sample JSFiddle or a shared playground link demonstrating the issue.
Description
Using ui:emptyValue=null with a type=["number", "null"] property doesn't actually give you null back. This appears to be an issue with when util.js:asNumber(null) ends up using new Number(null) which yields 0.
Steps to Reproduce
Make the age field empty. With the default widgets and current state, this is impossible, but it would be possible if asNumber is fixed. I have a custom Widget that passes null up thru onChange that reproduces this as well.
Expected behavior
For the value in formData to be null.
Actual behavior
The value in formData is 0.
Version
1.4.1