reset
behaviour with keepDefaultValues
option
#12659
Unanswered
Jastrzebowski
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I found inconsistent behaviour for Controlled and registered fields when resetting a form with
keepDefaultValues
. When the form is set using theshouldUnregister: true
option, a reset with thekeepDefaultValues: true
option will reset Controlled fields but not registered fields. Is this the desired behaviour?Codesandbox: https://codesandbox.io/p/sandbox/w4zyfn
In the Unregister form:
2. Click on set true keep
3. Only the controlledText value is changed
In the Regular form:
2. Click on set true keep
3. All values are changed
Beta Was this translation helpful? Give feedback.
All reactions