-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
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
issue: controlled field validation not updating when disabled
is boolean and value is object
#12127
issue: controlled field validation not updating when disabled
is boolean and value is object
#12127
Comments
The issue template didn't give me any space to add some additional info. I did some digging, and it appears this is a consequence of a few different mechanisms at work. First off, in the change handler: In In All together
|
…ith object input (react-hook-form#12185)
Version Number
7.52.0
Codesandbox/Expo snack
https://codesandbox.io/p/sandbox/compassionate-leaf-9gsxtf
Steps to reproduce
Through the reproduction:
"invalid" appears below the input
Expected behaviour
Validation is triggered on change and the field is updated to be
invalid: false
.Instead, validation is triggered but the field state is not updated. To see this behaviour, click the button to toggle the disabled value to
undefined
and repeat the steps.What browsers are you seeing the problem on?
Firefox, Chrome
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: