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
We should check each of the *Field components in app/components/form/fields to see how we're passing the props from useController. There was one case (see below) where we were missing ref, that was very important for focusing the field on validation error. But even in cases that don't appear broken right now, failing to pass onBlur or disabled could mean things don't work the way we expect in the future. See #1895, where we hope to use a top-level disabled prop on the form to disable all fields instead of doing it manually one by one.
Something I noticed while looking at this is that even after adding ref, we are not giving all the props from field to Listbox. We are still missing onBlur and disabled, both of which could become more UX-relevant in the future. For example, if we change a form from the RHF default of validating on submit to validating on blur, the lack of onBlur here will be a problem. Similarly, if we do #1895, I think the lack of disabled here will be a problem. We can fix it here, but I'm guessing there are a bunch more cases like this.
We should check each of the
*Field
components in app/components/form/fields to see how we're passing the props fromuseController
. There was one case (see below) where we were missingref
, that was very important for focusing the field on validation error. But even in cases that don't appear broken right now, failing to passonBlur
ordisabled
could mean things don't work the way we expect in the future. See #1895, where we hope to use a top-level disabled prop on the form to disable all fields instead of doing it manually one by one.Originally posted in #2364 (comment)
The text was updated successfully, but these errors were encountered: