What problem does it solve?
Build datagrids that can sort rows correctly and consistently across UI interactions and state updates, including custom and fuzzy ordering.
Core Features & Use Cases
- Clickable header sorting & multi-sort: Use header toggle handlers (including Shift+click multi-sort) to update
state.sorting reliably.
- Custom sort logic: Register or author
sortFn (including sortFns built-ins) for domain-specific ordering like enums and ranks.
- Correct edge-case handling: Control
sortDescFirst, sortUndefined (first/last/absolute end), and invertSorting without breaking direction toggles.
- Server-side friendly sorting: Enable
manualSorting so your backend owns the ordering while the UI still drives sorting state.
Quick Start
Use the sorting skill to configure sortedRowModel with createSortedRowModel(sortFns) and connect sorting state with onSortingChange so clicking column headers updates the correct row order for your dataset.