Skip to content

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

Open
aayushbaluni wants to merge 1 commit into
refinedev:mainfrom
aayushbaluni:fix/7401-field-array-stale-on-revisit
Open

fix: reset field array values on data refetch during SPA navigation#7406
aayushbaluni wants to merge 1 commit into
refinedev:mainfrom
aayushbaluni:fix/7401-field-array-stale-on-revisit

Conversation

@aayushbaluni

Copy link
Copy Markdown

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-bot

changeset-bot Bot commented May 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cd20fd7

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

@Woutuuur

Copy link
Copy Markdown

Hi, there's already a PR open for this issue: #7402. Do you see any problems with its implementation? If so, let's discuss there instead of creating additional PRs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] useFieldArray fields empty on second visit when using useForm

2 participants