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
Fields inside the ArrayInput aren't set as dirty when built #9782
Comments
Hi, I highly suspect this comes from this RHF issue, into which we ran recently too, and which should be fixed in the next RHF patch version. The reason why you don't see it in dev mode is because the root issue has to do with controller components registration / unregistration, and in your sandbox you have Let's wait for the next patch version of RHF to be released, so that we can confirm it fixes the issue. Thanks again for the report in any case! |
ArrayInput
has different behaviour in dev and in build.I have a
SimpleForm
with anArrayInput
that has different inputs.On a dev environment, when I am on an edit view, after editing a field that's inside the ArrayInput, the Save button is enabled and I'm able to save it.
On a built environment, in the same situation as described above, the save button remains disabled and the form isn't dirtied.
What you were expecting:
Both environments should behave in the same way, enabling the save button after editing a field that's nested inside an ArrayInput.
What happened instead:
The built env is not setting the edited field as dirty when that field is nested in an ArrayInput.
Steps to reproduce:
npm run build-and-serve
in the codesandbox from below)ArrayInput
Related code:
https://codesandbox.io/p/devbox/arrayinput-bug-vtqyxv?file=%2Fsrc%2FApp.tsx%3A22%2C19
Other information:
Environment
The text was updated successfully, but these errors were encountered: