RowReorder with child row
RowReorder with child row
![yelob](https://secure.gravatar.com/avatar/a2a3b35697d7565825134b27a08adecf/?default=https%3A%2F%2Fvanillicon.com%2Fa2a3b35697d7565825134b27a08adecf_200.png&rating=g&size=120)
I know DT automatically reorders the child row once a parent row is dropped, but has anyone figured out a way to make the row reordering drag both the parent and any children? The UX is confusing when a child row doesn't move with the drag action.
If not, it seems like updating the _clone
method of my local copy of datatables.js
to look for a child row would take me in the right direction. Any thoughts?
This discussion has been closed.
Answers
I haven't tried it but I wonder if using the RowReorder events might be easier.
https://datatables.net/reference/event/#rowreorder
Maybe you could close the child using the
pre-row-reorder
then reopen using therow-reordered
event. Might still be confusing to hide then show the child using these.Kevin
Thanks, Kevin, I may try that if I hit a wall. Currently I've updated the _clone method locally to append the childRow (if it exists):
That seems to work great to see the child row in the floating element being dragged. Now I just need to figure out where/how the row being dragged is getting hidden in the table and do the same for the child row.