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
I'm trying to build a consistent form experience where when the user encounters an error, it scrolls to the invalid field. I see there's an example of this in the docs, but the issue I'm running into is sharing that logic with all forms. I thought formOptions would be a good fit, but TypeScript complains about incompatible types (since consuming form has defaultValues defined but I want my options to be anyTFormData.
Can anyone give advice/code example where they have a consistent Form react component that is used with multiple forms and it shares some common behaviors?
Do you really need to type formOptions as this to get it to work? formOptions<any, any, any, any, any, any, any, any, any, any, any, any, any>
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
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to build a consistent form experience where when the user encounters an error, it scrolls to the invalid field. I see there's an example of this in the docs, but the issue I'm running into is sharing that logic with all forms. I thought
formOptionswould be a good fit, but TypeScript complains about incompatible types (since consuming form hasdefaultValuesdefined but I want my options to beanyTFormData.Can anyone give advice/code example where they have a consistent Form react component that is used with multiple forms and it shares some common behaviors?
Do you really need to type
formOptionsas this to get it to work?formOptions<any, any, any, any, any, any, any, any, any, any, any, any, any>Thank you!
Beta Was this translation helpful? Give feedback.
All reactions