Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node
I'm not sure if this is a Covex issue or just React. I suspect the latter but hoping someone can help.
I am using dnd-kit to create a UI that you can move items within a sortable list. After dropping an item, a mutation takes place to update the Convex DB. This works great with a single list. I also have some items that can contain nested items. If I move an item into the container within another item, I think dnd-kit is updating the dom, the mutation takes place, then the convex query sees the data has changed and tries to update the dom again and gives this error:
I think it's because the node has already been removed by dnd-kit. Is there a way around this? Is there some way to tell the Covex query to ignore the error if something has already moved?
2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
this is indeed a dnd-kit react issue