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
Hi,
Recently I've upgraded to the latest version (from 3.1.0) which uncovered a lot of typing issues now that the form type is inferred from the yup schema...
This code is great for enforcing that both fields are present and not null for sending the payload to the server but I'm having issues resetting the form dynamically: setValue('allowanceModel', undefined, { shouldValidate: true });
As the allowanceModel fields is required...
Any ways around it?
How can I provide a default value only for the useExcessStipend taken from the component props? I want to make sure that if the component re-renders with a different value for useExcessStipend in the props the form would set it's state to the new value
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.
-
Hi,
Recently I've upgraded to the latest version (from
3.1.0
) which uncovered a lot of typing issues now that the form type is inferred from the yup schema...Given the code:
Few questions
This code is great for enforcing that both fields are present and not null for sending the payload to the server but I'm having issues resetting the form dynamically:
setValue('allowanceModel', undefined, { shouldValidate: true });
As the
allowanceModel
fields isrequired
...Any ways around it?
How can I provide a default value only for the
useExcessStipend
taken from the component props? I want to make sure that if the component re-renders with a different value foruseExcessStipend
in the props the form would set it's state to the new valueKudos for the great library!
Beta Was this translation helpful? Give feedback.
All reactions