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
When a text input is invalid, it reports a change of undefined to the parent form.
This generally works, but falls down in a number of scenarios.
For example, distinguishing between "the parent form told us to change to something invalid" (e.g. resetting a form with an invalid field) and "we told the parent form we're invalid, it's just echoing that back to us" is impossible. I thought I had a way in that I could use focus/blur events to discard any changes while the input was focused, but that's not a fix - the events don't reliably happen in any particular order, especially on big forms, so sometimes the latter is confused for the former.
We might be able to fix this by instead using an object for an invalid value. That way we could:
Distinguish between invalid values generated by the component and the form.
Maybe include some additional metadata about the issue?
The text was updated successfully, but these errors were encountered:
When a text input is invalid, it reports a change of
undefined
to the parent form.This generally works, but falls down in a number of scenarios.
For example, distinguishing between "the parent form told us to change to something invalid" (e.g. resetting a form with an invalid field) and "we told the parent form we're invalid, it's just echoing that back to us" is impossible. I thought I had a way in that I could use focus/blur events to discard any changes while the input was focused, but that's not a fix - the events don't reliably happen in any particular order, especially on big forms, so sometimes the latter is confused for the former.
We might be able to fix this by instead using an object for an invalid value. That way we could:
The text was updated successfully, but these errors were encountered: