What problem does it solve?
Drag-and-drop column reordering in TanStack Table v9 often breaks when developers treat the columnOrder state as the final rendered order, use unstable header labels as drag identities, or mutate the state array in place, causing desynchronized or non-reactive tables.
Core Features & Use Cases
- Stable ID-based ordering: Uses leaf column IDs as drag identities and replaces the columnOrder array immutably via table.setColumnOrder.
- Region-aware rendering: Explains how pinning regions, column visibility, and groupedColumnMode apply after base ordering, directing rendering through table.getAllLeafColumns() or table.getVisibleLeafColumns().
- Use Case: When building a React data grid with drag-and-drop column reordering plus pinned columns, this Skill ensures the rendered order matches user expectations by combining columnOrderingFeature with pinning and visibility plugins correctly.
Quick Start
Register columnOrderingFeature in tableFeatures, initialize columnOrder state with leaf column IDs, and reorder by splicing a copied array before calling table.setColumnOrder.