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
removeFieldValue keeps data from subfields when used with form.AppField - unable to delete last row in AgGrid #1820
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.
I was going to open a new issue but looks like this is the same. I just asked in Discord but didn't get a timely response so will post here as well.
As the name implies the first two remove only the field value but keeps metadata intact. Only the third one deletes the field along with its metadata.
Should not first two also remove the metadata as the field is not going to be anymore in the array? It just stays there with bad validation details for a field that doesn't exist anymore.
// Doesn't remove field meta from the formfield.removeValue(index);form.removeFieldValue("references",index);// Properly removes the field metaform.deleteField(`references[${index}]`);
Activity
kusiewicz commentedon Oct 23, 2025
#1809
May be related to
msanchezdev commentedon Jan 3, 2026
I was going to open a new issue but looks like this is the same. I just asked in Discord but didn't get a timely response so will post here as well.
As the name implies the first two remove only the field value but keeps metadata intact. Only the third one deletes the field along with its metadata.
Should not first two also remove the metadata as the field is not going to be anymore in the array? It just stays there with bad validation details for a field that doesn't exist anymore.