Skip to content

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

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

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!

@stale

stale Bot commented Jul 1, 2026

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the wontfix This will not be worked on label Jul 1, 2026
@stale stale Bot closed this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wontfix This will not be worked on

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