Describe the bug#
When replacing an array object using the replaceFieldValue api, meta object for underlying fields is being updated despire the option dontUpdateMeta.
Your minimal, reproducible example#
https://stackblitz.com/edit/vitejs-vite-iqkcjas5?file=src%2Fcomponents%2FForm.tsx
Steps to reproduce#
On my preview, notice how dontUpdateMeta is set to true, yet as soon as we click on the replace item button, we see isTouched equals true.
Expected behavior#
Upon exeucting form.replaceFieldValue with config option dontUpdateMeta, the meta of the underlying fields replaced, is NOT touched.
How often does this bug happen?#
Every time
Screenshots or Videos#
No response
Platform#
Platform agnostic as it's easily reproducible in Stackblitz link.
TanStack Form adapter#
None
TanStack Form version#
v0.41.3
TypeScript version#
~5.7.2
Additional context#
From looking into this, when calling replaceFieldValue, we're always forcibly validating the underlying fields here.
Then within the validateField function, we always mark as touched. See here.
Just as a heads up - you should now be using
dontUpdateMetain any capacity. What are you trying to achieve from a UX perspective?