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
null and false values should not equal each other in deepEqual customizer #2978
Comments
In case all you're trying to do is to verify the selection status of a radio button: you can tell do that by using props such as |
the issue is that /src/defaultShouldValidate.js uses the deepEqual customizer to determine whether it should validate. For example lets say I have a form with boolean radio fields.
I'm supplying my own shouldValidate function to get around this issue, but I don't think it makes sense for null == false to be the default behavior, that commit should be rolled back |
I've bumped into this as well and have a sandbox reproducing the issue. To reproduce:
This doesn't happen when selecting yes first. Only when going from |
This is yet another case that led to the v7.0.0 release:
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
null and false values should not equal each other in deepEqual customizer. see commit:
a4c1d9f
For example, in a radio group. an unselected radio group (null) is a completely different state from selecting the false option.
The text was updated successfully, but these errors were encountered: