fix: reset field array values on data refetch during SPA navigation
Problem
When using useForm with useFieldArray, field arrays are populated correctly on first visit but empty on subsequent SPA navigations because the form state isn't properly refreshed with new query data.
Change
Ensure the form is properly reset with fresh data when the query refetches on navigation, preserving field array population across SPA visits.
Fixes #7401.
Made with Cursor
🦋 Changeset detected
Latest commit: cd20fd77aedffc6ad5f19dd4c727fb564e21bb7e
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @refinedev/react-hook-form | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Hi, there's already a PR open for this issue: https://github.com/refinedev/refine/pull/7402. Do you see any problems with its implementation? If so, let's discuss there instead of creating additional PRs!