Skip to content

feat!: move to TanStack Table v9 - #21

Merged
SyedSibtainRazvi merged 2 commits into
mainfrom
feat/tanstack-table-v9
Nov 19, 2026
Merged

SyedSibtainRazvi merged 2 commits into
mainfrom
feat/tanstack-table-v9

Conversation

@SyedSibtainRazvi

@SyedSibtainRazvi SyedSibtainRazvi commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Etiquettes of raising a PR

PR reviews are a way to request peers to give feedback on the code that is going
to the mainline. This means, that PR should be in a reviewable state. Please ensure
that the following checkboxes are ticked. If any of them are not ticked, then
the PR is not ready for review

  • Did you test changes locally?
  • Did you check PR contents after opening the PR

Related issue

Functionalities added or changed

  • useSheet runs on v9's useTable. The peer dependency is @tanstack/react-table ^9.3.1, the latest release.
  • One fixed feature set: v9 only includes registered features. The sheet registers sorting, column and global filtering, faceting, column sizing, resizing, visibility and ordering, and row pinning, plus the sort and filter functions TanStack picks by itself. Apps can't pass their own set: v9's docs type every table and component by one set, so Sheet, SheetHeader and SheetRow are typed for it with no casts.
  • Header filters on v9:
    • textFilter is v9's filterFn_includesString, and valuesFilter is built with constructFilterFn.
    • The checklist's counts come from the facetedRowModel and facetedUniqueValues slots.
    • With manualFiltering, a checklist lists the values in the loaded rows.
  • SheetColumnDef<TData>: types a column array for the sheet's features.
  • Docs: README (requirements, examples, a "Feature set" section, API reference), decisions.md, architecture.md and AGENTS.md.

Additional info

  • Breaking. This should go out as 0.3.0. For an app:
    • Bump @tanstack/react-table to v9.
    • createColumnHelper<Task>() becomes createColumnHelper<SheetFeatures, Task>(), and ColumnDef<Task>[] becomes SheetColumnDef<Task>[].
    • Build arrays of helper columns with columnHelper.columns([...]).
    • sortingFn becomes sortFn, table.getState() becomes table.state, and state.columnSizingInfo becomes state.columnResizing.
    • Features the sheet doesn't register, such as row selection or pagination, aren't available.
    • Any other sort or filter function goes straight on the column as its sortFn or filterFn.
    • The getFacetedUniqueValues option is gone: with manualFiltering, a checklist lists the loaded values.
  • Per the v9 docs: checked against TanStack's v9.3.1 migration, filtering, faceting, sorting and resizing guides. One thing is left for a follow-up PR: v9's resizing guide replaces the memoised body with CSS variables and table.Subscribe islands.
  • Behaviour: v9 applies drag-resize moves once per animation frame. One unit test now waits a frame.
  • Tests: 150 unit tests and all 35 e2e tests pass, including both axe scans. The README's examples typecheck.
  • Rebased on main (0.2.2): typing into cells and the "+" under the row numbers, from feat: type straight into cells, and add rows from right below them #23, work on v9 unchanged.

Checklist

  • Tests
  • Translations
  • Documentation
  • Uploaded screenshots
  • Verified on preview url once

Screenshots

Page(s) if applicable

No visual change.

useSheet builds its table with v9's useTable from the sheet's one feature
set: sorting, column and global filtering, faceting, column sizing,
resizing, visibility and ordering, and row pinning, with the sort and
filter functions TanStack picks by itself. The set is fixed, as v9's docs
type every table and component by one set, so Sheet, SheetHeader and
SheetRow are typed for it with no casts.

The header filters move with it: textFilter is v9's filterFn_includesString,
valuesFilter is built with constructFilterFn, and the checklist's counts
come from the facetedRowModel and facetedUniqueValues slots.

SheetColumnDef<TData> types a column array for the sheet's features.

BREAKING CHANGE: the peer dependency is @tanstack/react-table ^9.3.1.
TanStack's types take the feature set first, so
createColumnHelper<Task>() becomes createColumnHelper<SheetFeatures, Task>()
and ColumnDef<Task> becomes SheetColumnDef<Task>. Arrays of helper columns
are built with columnHelper.columns(). `sortingFn` is `sortFn`,
table.getState() is table.state, and state.columnSizingInfo is
state.columnResizing. Features the sheet doesn't register, such as row
selection, aren't available. A sort or filter function other than the ones
TanStack picks by itself goes straight on the column as its sortFn or
filterFn. With manualFiltering, a valuesFilter checklist lists the values
in the loaded rows: the getFacetedUniqueValues option is gone.
@SyedSibtainRazvi
SyedSibtainRazvi merged commit c6cbd5c into main Nov 19, 2026
1 check passed
@SyedSibtainRazvi
SyedSibtainRazvi deleted the feat/tanstack-table-v9 branch November 19, 2026 17:35
@SyedSibtainRazvi SyedSibtainRazvi mentioned this pull request Nov 19, 2026
3 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant