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
Add the ability to reorder rows, both interactively (drag-and-drop) and programmatically, mirroring the existing column reordering capability.
Motivation
The library already supports column reordering. Row reordering is a common companion requirement: manual priority ordering, building ordered lists/queues, arranging steps, etc. There is currently no first-class way to do it.
Proposed API (for discussion)
draggableRows?: boolean — enable drag-to-reorder on rows.
onRowOrderChange?: (nextData, { from, to, row }) => void — fired after a reorder; consumer owns the data array and updates state.
Optional drag handle column / handle affordance rather than whole-row drag, to avoid conflicts with row click / selection.
Considerations
Interaction with selectableRows, expandable rows, and row click handlers (drag vs. click disambiguation).
Interaction with sorting: reordering only makes sense against an unsorted / manual order; decide whether enabling drag disables sort or reorders the underlying array.
Pagination: whether drag can move a row across pages.
Summary
Add the ability to reorder rows, both interactively (drag-and-drop) and programmatically, mirroring the existing column reordering capability.
Motivation
The library already supports column reordering. Row reordering is a common companion requirement: manual priority ordering, building ordered lists/queues, arranging steps, etc. There is currently no first-class way to do it.
Proposed API (for discussion)
draggableRows?: boolean— enable drag-to-reorder on rows.onRowOrderChange?: (nextData, { from, to, row }) => void— fired after a reorder; consumer owns the data array and updates state.Considerations
selectableRows, expandable rows, and row click handlers (drag vs. click disambiguation).