Produit & Go-to-marketSûr100100/100
Sorting (TanStack)
Sort with rowSortingFeature, sortedRowModel, sortFns, multi-sort and removal options, sortUndefined, and manualSorting. Load for comparator direction, incoming server order, or product-specific sorting cycles.
ou envoie-le directement à ton agent.
Installer dans ton projet
$ curl -fsSL https://arboristhree.xyz/cli/install-skill.mjs -o /tmp/arboris-install-skill.mjs && node /tmp/arboris-install-skill.mjs sorting__tanstack-table__packages-table-core-skills-07ea9c2540edTanStack
TanStack/table
Contenu à copier
---
name: sorting
description: >
Sort with rowSortingFeature, sortedRowModel, sortFns, multi-sort and removal options, sortUndefined, and manualSorting. Load for comparator direction, incoming server order, or product-specific sorting cycles.
metadata:
origin: TanStack
{ type: sub-skill, library: '@tanstack/table-core', library_version: '9.2.4' }
requires: ['core', 'table-features', 'client-vs-server']
sources:
- 'TanStack/table:docs/framework/react/guide/sorting.md'
- 'TanStack/table:packages/table-core/src/features/row-sorting'
- 'TanStack/table:examples/react/sorting'
---
This skill builds on `core`, `table-features`, and `client-vs-server`. Sorting state describes order; client processing requires a sorted model and server processing requires sorted input.
## Setup
```ts
import {
createSortedRowModel,
rowSortingFeature,
sortFn_alphanumeric,
sortFn_text,
tableFeatures,
} from '@tanstack/table-core'
export const features = tableFeatures({
rowSortingFeature,
sortedRowModel: createSortedRowModel(),
sortFns: { alphanumeric: sortFn_alphanumeric, text: sortFn_text },
})
```
Import individual `sortFn_*` built-ins and register only those your columns
reference by string name or that `sortFn: 'auto'` should resolve for your data
types. The full `sortFns` registry object still works but bundles every
built-in; numeric columns fall back to a basic comparator without registration.
## Core Patterns
```ts
const options = { enableSortingRemoval: false, enableMultiSort: true }
const numericColumn = { sortUndefined: 'last' as const }
```
Configure sort cycles and undefined placement to match the product rather than relying on implicit defaults.
## Common Mistakes
### [CRITICAL] Expecting manual mode to reorder
Wrong: `const options = { data: unsortedRows, manualSorting: true }`
Correct: `const options = { data: serverSortedRows, manualSorting: true }`
Manual sorting bypasses `sortedRowModel` and trusts incoming order.
Source: `packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts`
### [HIGH] Reversing inside the comparator
Wrong: `const newest: SortFn<any, any> = (a, b, id) => b.getValue<number>(id) - a.getValue<number>(id)`
Correct: `const numeric: SortFn<any, any> = (a, b, id) => a.getValue<number>(id) - b.getValue<number>(id)`
Return ascending comparison only; Table reverses it when sorting is descending.
Source: `docs/framework/react/guide/sorting.md#custom-sorting-functions`
### [MEDIUM] Leaving ambiguous sort policy
Wrong: `const options = { enableSortingRemoval: true }`
Correct: `const options = { enableSortingRemoval: false }; const rankColumn = { sortUndefined: 'last' as const }`
Undefined placement and removal cycles can differ from expected product behavior unless configured.
Source: `packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts`
## API Discovery
Inspect `node_modules/@tanstack/table-core/dist/features/row-sorting/` and `dist/features/row-sorting/sortFns.d.ts` for current names and comparator contracts.Colle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.
Ce que fait Sorting (TanStack)
Applique les pratiques du skill sorting__tanstack-table__packages-table-core-skills-07ea9c2540ed.
Comment utiliser Sorting (TanStack)
1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.
Déclencheurs pour Sorting (TanStack)
Dis simplement à ton agent quelque chose comme :
Applique le skill sorting__tanstack-table__packages-table-core-skills-07ea9c2540ed à cette tâche
Utilise sorting__tanstack-table__packages-table-core-skills-07ea9c2540ed pour améliorer cette implémentation
Passe en revue ce sujet avec sorting__tanstack-table__packages-table-core-skills-07ea9c2540ed
Skills liés à Sorting (TanStack)
Abandonment Analysis (Microsoft)
Helps a Marketing Manager review anonymous synthetic abandonment patterns without contacting shoppers.Add Seo (Microsoft)
Adds SEO essentials to a Power Pages code site, including robots.txt, sitemap.xml, meta tags, Open Graph tags, and favicon configuration. Use when the user wants to improve search engine optimization or make their site more searchable.ai-seo
When the user wants to optimize content for AI search engines, get cited by LLMs, or appear in AI-generated answers. Also use when the user mentions 'AI SEO,' 'AEO,' 'GEO,' 'LLMO,' 'answer engine optimization,' 'generative engine optimization,' 'LLM optimization,' 'AI Overviews,' 'optimize for ChatGPT,' 'optimize for Perplexity,' 'AI citations,' 'AI visibility,' 'zero-click search,' 'how do I show up in AI answers,' 'LLM mentions,' 'optimize for Claude/Gemini,' 'llms.txt,' 'OKF,' 'Open Knowledge Format,' 'knowledge bundle,' or 'agent-readable site.' Use this whenever someone wants their content to be cited or surfaced by AI assistants and AI search engines. For traditional technical and on-page SEO audits, see seo-audit. For structured data implementation, see schema.