sorting

Official

Sort table rows with predictable behavior

AuthorTanStack
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: sorting
Download link: https://github.com/TanStack/table/archive/main.zip#sorting

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.