T
TanStack13mo ago
liable-blush

Duplicate subRows

I need to set up a drag and drop with rows and subRows, and I'm having problems, it's duplicating the subrows, how can I avoid it? See the photos, so you can understand the context, any light? please
No description
No description
No description
No description
1 Reply
genetic-orange
genetic-orange13mo ago
Having looked at all of your examples from both of your questions here, is there any reason you are using the splice method in JS. This is a destructive method that mutates the original array, likely causing untold bugs here. Ensure you’re setting your data object predictably with recommended patterns as described in the react docs. https://react.dev/learn/updating-objects-in-state
Updating Objects in State – React
The library for web and native user interfaces

Did you find this page helpful?