You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
form.resetField does not reset to default value when default value is undefined #2424
In a form whose schema has optional fields, after calling form.resetField function on an optional field whose default value is undefined, the current value is still present and is not undefined as expected.
The same function works for fields that have defined default values, i.e. resetField turns the current value to the defined default value.
In the rendered sandbox webpage, note that the default value of foo (the field in question) is undefined
Begin typing any string in input box, observing that the string is reflected below, next to Current value of 'foo'
Click on button to reset, noting that the user input string is still shown next to Current value of 'foo'
Expected behavior
When form.resetField is called, that field's value should become identical to the default value, including undefined, and field meta such as isDefaultValue should be true.
Activity