refine icon indicating copy to clipboard operation
refine copied to clipboard

fix: reset field array values on data refetch during SPA navigation

Open aayushbaluni opened this issue 7 months ago • 2 comments

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

aayushbaluni avatar May 02 '26 03:05 aayushbaluni

🦋 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

changeset-bot[bot] avatar May 02 '26 03:05 changeset-bot[bot]

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!

broekew avatar May 11 '26 12:05 broekew