Drag to Reorder Columns
Users drag a header cell to move its column to a new position. A drop indicator shows where the column will land. This lets users arrange columns to match their workflow.
Planned. This page shows the specification from issue #185. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
10 columns. The event log shows columnMoved events with fromIndex and toIndex.
Expected behavior
Dragging a header shows a ghost image and a vertical drop indicator between headers. Dragging near the viewport edges auto-scrolls the grid horizontally. On drop, the column moves and the cells animate into place if animations are on. Pressing Escape during the drag cancels it.
Planned API surface
columnDef.movablegridOptions.suppressColumnMovegridOptions.animateColumnMoveevent:columnMovedapi.moveColumn(columnId, toIndex)Acceptance criteria
- The column order after the drop matches the indicator position. (pending)
- The columnMoved event payload includes columnId, fromIndex, toIndex and source. (pending)
- Escape cancels the drag with no state change and no event. (pending)
- A drag that starts on a column with movable=false does not begin. (pending)
- Auto-scroll triggers within 40px of the viewport edges. (pending)