customizing-feature-behavior

Override per-column sort, filter, and aggregation functions in TanStack Table v9.

28.3k|3.6k|Updated Oct 20, 2016
One-click install
npx skills add https://github.com/TanStack/table --skill customizing-feature-behavior
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: customizing-feature-behavior
Source: https://github.com/TanStack/table/tree/main/packages/table-core/skills/customizing-feature-behavior
Command: npx skills add https://github.com/TanStack/table --skill customizing-feature-behavior

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents you from being locked into TanStack Table’s default behaviors by letting you override how rows are filtered, sorted, and grouped per column or globally.

Core Features & Use Cases

  • Per-column function overrides: Replace sortFn, filterFn, and aggregationFn with custom logic or registered built-ins.
  • Table-level global filtering: Override globalFilterFn to change how the entire table is filtered.
  • Cross-feature composition: Chain filtering into sorting using addMeta and row.columnFiltersMeta, and separate grouped value computation (aggregationFn) from rendering (aggregatedCell).
  • Use Case: Implement fuzzy search that ranks results in a custom filter, then sorts by that rank while also supporting grouped summaries like weighted averages.

Quick Start

Use the customizing-feature-behavior skill to override column filterFn, sortFn, and aggregationFn so your table’s filtering ranks are preserved into sorting and your grouped rows render computed aggregate values.

Frequently Asked Questions about customizing-feature-behavior

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I customize sorting and filtering logic per column in TanStack Table?

Override per-column sorting and filtering in TanStack Table by replacing `sortFn` and `filterFn` in column definitions with custom logic or registered built-ins from the `sortFns` and `filterFns` registries.

How does TanStack Table handle custom aggregation for grouped rows?

Custom aggregation for grouped rows in TanStack Table is handled by defining an `aggregationFn` to compute the grouped value, keeping this computation separate from the `aggregatedCell` rendering logic used to display it.

Can I chain filter results into sorting in TanStack Table v9?

Yes, you can chain filtering into sorting in TanStack Table v9 by attaching custom metadata via `addMeta` during filtering, then accessing `row.columnFiltersMeta` within your custom sort function to rank results by filter relevance.

What is the best way to implement fuzzy search ranking that hands off to a deterministic sort in a React data grid?

Implement fuzzy search ranking by overriding the `filterFn` to calculate and store match ranks in column filter meta, then use a custom `sortFn` to read those ranks for deterministic sorting handoff in your React data grid.

How do I control sort direction for undefined values or descending first in TanStack Table?

Control sort direction for undefined values or descending-first ordering in TanStack Table by configuring the `sortUndefined` and `sortDescFirst` properties within your column definitions for fine-grained sorting behavior.

Does TanStack Table support overriding global filtering for the entire table?

Yes, TanStack Table supports overriding global filtering for the entire table by setting the table-level `globalFilterFn` property to a custom function or registered named function to change how all rows are filtered.