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 using a useFieldArray and we are getting error in root: formState.errors.fields.root
how you can focus on some element, maybe a wrapper when the error occurs? Ref from root has only name in it and using it with setFocus does not do anything. Do you need a custom scroll to element? If I would do a custom one won't there be a race condition when error somewhere else occur? Then It will scroll to it as well through react-hook-form internal focus.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
when using a useFieldArray and we are getting error in root:
formState.errors.fields.root
how you can focus on some element, maybe a wrapper when the error occurs? Ref from root has only name in it and using it with setFocus does not do anything. Do you need a custom scroll to element? If I would do a custom one won't there be a race condition when error somewhere else occur? Then It will scroll to it as well through react-hook-form internal focus.
Beta Was this translation helpful? Give feedback.
All reactions