-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
incorrect isDirty values in formGroups #9365
Comments
Hi, I managed to reproduce, and can also confirm the issue is consecutive to the react-hook-form change you mentioned (released in v7.46.0). Indeed, the issue disappears if you comment the We can see it clearly in this sandbox (RHF v7.45.4) vs this sandbox (RHF 7.47.0): the form is considered dirty after clicking the second checkbox, only in the second sandbox. I must admit I don't understand why they made that change in react-hook-form/react-hook-form#10805. Anyways, this is a RHF issue, so best we can do is ask to reopen the issue you created, and make it clearer this has nothing to do with the |
I've left this comment, hopefully they will answer. I'll close this issue now, since it's not related to react-admin after all. |
@slax57 Okay, thank you! |
For anyone having this issue, you can work around it by adding |
We've also added support for the |
What you were expecting:
In our use case, we are using multiple groupForms with inputs and want the other group/input to be disabled once the user has started to type something in one of the input fields. I have tried to reproduce this behaviour and created a minimal example with two fromGroups('name' and 'state') with a text input inside each group. When the user types something in the 'name ' field, the other one ('state') should be disabled. And the other way around, when typing something in 'state', 'name' should be disabled respectively.
What happened instead:
Both fields are disabled when starting to type something in one of the fields because of incorrect isDirty values.
Steps to reproduce:
Related code:
Other information:
I have already opened a bug ticket in react-hook-form, but it has been closed there because this is not a part of their API: react-hook-form/react-hook-form#11055
We assume that this is related to the react-hook-form update to v. 7.46.0 (https://github.com/react-hook-form/react-hook-form/pull/10805/commits)
Environment
The text was updated successfully, but these errors were encountered: