Version Number
1.0.6
Codesandbox/Expo snack
No response
Steps to reproduce
- Have an optional field
- If you never touch it, the field value is unset (
undefined)
- Touch the field
- You can now never set it back to
undefined, because useTsController eats onChange(undefined)
This bug means that:
- If an optional field has never been touched, it's
undefined
- If an optional field has been touched, the closest you can get to clearing it is setting it to
null
Expected behaviour
Don't eat onChange(undefined). Forward it up to the passed onChange.
Relevant log output
No response
Version Number
1.0.6
Codesandbox/Expo snack
No response
Steps to reproduce
undefined)undefined, becauseuseTsControllereatsonChange(undefined)This bug means that:
undefinednullExpected behaviour
Don't eat
onChange(undefined). Forward it up to the passedonChange.Relevant log output
No response