help please, drag and drop rows and subrows
Could someone help me? I need to create a drag and drop, where I can change the position of the rows (I can already do that), the problem is when I try to drag each subrow, I need to move each subrow to where I want, either within the row or to another row, does anyone have any idea? I've been struggling with this for 3 days now.



1 Reply
funny-blue•5mo ago
I'm also struggling with this. I think this is a limitation on tan stack table. DND-kit resolves this by having nested sortable / draggable contexts, but this is very hard to do here, as far as I understand, because tan stack table "flattens" all the rows when rendering them, without a dom hierarchy for subrows. I was hoping to be able to have some sort of "parent wrapper" where I would configure the dragable/ sortable context, so that when dragging the parent, all the children would also get dragged.
So far the closest answer I got was to manually render the subrows with
{row.subRows.map((subRow) => (