We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7.28.1
https://codesandbox.io/s/new-rain-wgxvv1?file=/src/Form.js
The shouldUnregister prop on Controller is mutating the defaultValues object used to instantiate the form.
shouldUnregister
Controller
defaultValues
Toggle Form
firstName
Note: The shouldUnregister flag on register does not produce this bug (as noted in the code sandbox).
register
Controller should not be mutating the object being passed into defaultValues.
Firefox
No response
The text was updated successfully, but these errors were encountered:
fix #8071 clean up at useForm useEffect
feba871
8ca8993
🐞 close #8071 issue on shouldUnreigster mutate defaultValues
829bb60
ac076c5
Thanks so much @bluebill1049 ! 🙇🏻
Sorry, something went wrong.
No branches or pull requests
Version Number
7.28.1
Codesandbox/Expo snack
https://codesandbox.io/s/new-rain-wgxvv1?file=/src/Form.js
Steps to reproduce
The
shouldUnregister
prop onController
is mutating thedefaultValues
object used to instantiate the form.Toggle Form
to unmount the form.firstName
is no longer populated AS WELL as thedefaultValues
object being mutated in the console.Note: The
shouldUnregister
flag onregister
does not produce this bug (as noted in the code sandbox).Expected behaviour
Controller
should not be mutating the object being passed intodefaultValues
.What browsers are you seeing the problem on?
Firefox
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: