Closed
Description
Describe the bug
Arrays abnormally display form defaultValues after removeValue & pushValue.
It appears that a Field mount has been triggered.
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/vibrant-zhukovsky-9x3l6s
Steps to reproduce
- Click
delete
to deletename1
- Click
delete
to deletename2
- Click
Add person
to add new person,will showname1
&name2
, which is form defaultValues.
Expected behavior
Expect show empty value when add person.
How often does this bug happen?
Every time
Screenshots or Videos
Platform
- OS: macOS 15.2
- Browser: Edge 131.0.2903.112
TanStack Form adapter
react-form
TanStack Form version
v0.41.0
TypeScript version
v5.6.3
Additional context
A valid solution:
When pushing a value, assign a new value. Like pushValue({ name: "" })
Metadata
Metadata
Assignees
Labels
No labels