-
-
Couldn't load subscription status.
- Fork 536
Open
Description
Describe the bug
I am using Tanstack Form with AgGrid. When calling removeFieldValue, some subfields persist even after the parent field is removed. I suspect it has something to do with form.AppField. I noticed this problem when trying to delete the last row in AgGrid. When attempting to save the form after deleting the last row, the form is invalid and cannot be submitted.
Similar to this problem here: #1178
Your minimal, reproducible example
https://stackblitz.com/edit/bolt-vite-react-xodftmth?file=src%2FApp.tsx
Steps to reproduce
- Enter stackblitz
- Click Delete
- Click Submit
- Error is displayed because form is invalid
- Checking dev tools console logs, you can see that after the delete, the age field is left in fieldMeta
Expected behavior
I expect subfields to also be removed when removing the parent field.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Windows 10
Chrome 141.0.7390.78
TanStack Form adapter
None
TanStack Form version
v1.23.7
TypeScript version
v5.9.2
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels