Loading...
Loading...
TanStack Table v8 headless data tables for React. Covers column definitions, sorting, filtering (fuzzy/faceted), server-side pagination with TanStack Query, infinite scroll, virtualization (TanStack Virtual), column/row pinning, row expanding/grouping, column resizing, and reusable Shadcn-styled components. Prevents 15 documented errors including infinite re-renders, React Compiler incompatibility, and server-side state mismatches. Use when building data tables, fixing table performance, implementing server-side pagination, adding filtering/sorting, or debugging table state issues.
npx skill4agent add oakoss/agent-skills tanstack-table<table>| Pattern | API / Config | Key Points |
|---|---|---|
| Basic table | | Memoize data/columns to prevent re-renders |
| Column helper | | Type-safe column definitions |
| Column groups | | Nested headers; don't pin group columns |
| Sorting | | |
| Filtering | | |
| Pagination | | |
| Row selection | | Set |
| Column visibility | | Toggle with |
| Column pinning | | Don't pin group columns (known bug) |
| Row expanding | | For nested/tree data |
| Column resizing | | |
| Row grouping | | Performance degrades at 10k+ rows |
| Server-side | | All state in query key for proper refetching |
| Infinite scroll | | Combine with TanStack Virtual for best perf |
| Virtualization | | Disable when container hidden (tabs/modals) |
| React 19 Compiler | | Required until v9 fixes compiler compat |
| Task | Method |
|---|---|
| Sort column | |
| Filter column | |
| First page | |
| Next page | |
| Previous page | |
| Last page | |
| Go to page | |
| Select row | |
| Hide column | |
| Get original data | |
| Pin column | |
| Resize column | |
| Expand row | |
| Import | Purpose |
|---|---|
| Required |
| Sorting |
| Filtering |
| Pagination |
| Expanding |
| Grouping |
| Faceted filter counts |
| Unique values per facet |
| Min/max per facet |
| Mistake | Correct Pattern |
|---|---|
| Unstable data/columns reference | Memoize with |
Missing | Set |
| Query key missing table state | Include pagination, sorting, filters in queryKey |
Import from | Import from |
Using v7 | Use v8 |
| Pinning group columns | Pin individual columns within the group, not parent |
| Grouping on 10k+ rows | Use server-side grouping or disable for large datasets |
| Column filter not clearing on page change | Reset |
Missing | Add directive to components using |
Missing | Set |
| Filter value type mismatch | Match value types; clear with |
ExploreTaskcode-reviewerIf theskill is available, delegate data fetching, caching, and infinite query patterns to it. If thetanstack-queryskill is available, delegate standalone virtualization patterns to it. If thetanstack-virtualskill is available, delegate URL search param sync for server-side table state to it. If thetanstack-routerskill is available, delegate server functions for server-side data loading to it.tanstack-start