Background - I have a field that accepts null or the string YYYY-MM-DD
If you have a field with ['null', 'string'] and an initial value of null then changing the type to string both onUpdate and onEdit are called with the string value "null". If this fails the field validation then an error will be shown and editing is exited and returns the field back to null. Which means the user is not able to change the type.
I guess one solution is onEdit should not be called when the type changes, only when a user is done editing. I can also probably figure out a workaround to set a valid value instead when currentValue === null && newValue === 'null'. Is there anything else I am missing?
Thanks!
Background - I have a field that accepts
nullor the stringYYYY-MM-DDIf you have a field with
['null', 'string']and an initial value ofnullthen changing the type tostringbothonUpdateandonEditare called with the string value"null". If this fails the field validation then an error will be shown and editing is exited and returns the field back tonull. Which means the user is not able to change the type.I guess one solution is
onEditshould not be called when the type changes, only when a user is done editing. I can also probably figure out a workaround to set a valid value instead whencurrentValue === null && newValue === 'null'. Is there anything else I am missing?Thanks!