You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Field with mode="array" does not re-render after swapValues / moveValue since version 1.27.4 #2018
When using Field with mode="array", calling swapValues or moveValue updates the internal form state, but the component does not re-render.
In the example below, the fruits array is updated internally, but field.state.value does not reflect the change in the render output until another event triggers a re-render.
I guess my issue turned out to be a bit different from yours. Mine was in solidjs. I'm pretty sure I've done nothing other than updating to 1.28.3 to get things working as expected.
For your case, I think you've encountered the reactivity caveat mentioned here. This makes sense since the reference to defaultValue, form, as well as the props passed to form.Field remain unchanged even though the internal form state changed. Thus React itself doesn't have a reason to re-render the component.
I've modified your example here slightly to get re-rendering to work. Alternatively, you can also wrap your JSX in a <form.Subscribe>
In my case, the unexpected behavior happens specifically with field.swapValues and field.moveValue. With methods like pushValue, insertValue, removeValue, etc., the component re-renders as expected, so you don't need a form.Subscribe.
changed the title [-]Field with `mode="array"` does not re-render after `swapValues` / `moveValue`[/-][+]Field with `mode="array"` does not re-render after `swapValues` / `moveValue` after version `1.27.3`[/+]on Feb 17, 2026
changed the title [-]Field with `mode="array"` does not re-render after `swapValues` / `moveValue` after version `1.27.3`[/-][+]Field with `mode="array"` does not re-render after `swapValues` / `moveValue` since version 1.27.4[/+]on Feb 17, 2026
Activity
taivo commentedon Feb 15, 2026
Seeing the same thing in @tanstack/solid-form 1.28.2
taivo commentedon Feb 17, 2026
Looks like this has been fixed in
v1.28.3. The form's internal state is now consistent withfield().state.valuewhen swapArray is called.viniciusbitt commentedon Feb 17, 2026
I tried using version @tanstack/react-form@1.28.3, but it doesn’t seem to be working:
codesandbox
taivo commentedon Feb 17, 2026
I guess my issue turned out to be a bit different from yours. Mine was in solidjs. I'm pretty sure I've done nothing other than updating to 1.28.3 to get things working as expected.
For your case, I think you've encountered the reactivity caveat mentioned here. This makes sense since the reference to
defaultValue,form, as well as the props passed toform.Fieldremain unchanged even though the internal form state changed. Thus React itself doesn't have a reason to re-render the component.I've modified your example here slightly to get re-rendering to work. Alternatively, you can also wrap your JSX in a
<form.Subscribe>viniciusbitt commentedon Feb 17, 2026
In my case, the unexpected behavior happens specifically with
field.swapValuesandfield.moveValue. With methods likepushValue,insertValue,removeValue, etc., the component re-renders as expected, so you don't need aform.Subscribe.[-]Field with `mode="array"` does not re-render after `swapValues` / `moveValue`[/-][+]Field with `mode="array"` does not re-render after `swapValues` / `moveValue` after version `1.27.3`[/+]viniciusbitt commentedon Feb 17, 2026
I confirm that this issue was introduced in version
1.27.4, specifically in this PR: #1930[-]Field with `mode="array"` does not re-render after `swapValues` / `moveValue` after version `1.27.3`[/-][+]Field with `mode="array"` does not re-render after `swapValues` / `moveValue` since version 1.27.4[/+]JeremiahPinto commentedon Feb 23, 2026
Facing the same issue with
field.moveValueon@tanstack/react-form v1.28.3. The form re-renders on first change and then no longer updates UIfix(react-form): re-render mode="array" fields after swapValues/moveV…