Skip to content

feat: update to tanstack table v9 init#11055

Draft
KevinVandy wants to merge 1 commit into
shadcn-ui:mainfrom
KevinVandy:feat/table-v9-beta-docs
Draft

feat: update to tanstack table v9 init#11055
KevinVandy wants to merge 1 commit into
shadcn-ui:mainfrom
KevinVandy:feat/table-v9-beta-docs

Conversation

@KevinVandy

Copy link
Copy Markdown

Update Data Table docs & examples to TanStack Table v9 (beta)

TanStack Table v9 should launch as stable soonish (July), so I'm opening this as a draft PR that tests the latest beta (9.0.0-beta.23) end to end against our docs and examples. It will stay a draft until v9 goes stable. The goal is to do the work a bit early so we can flip it to ready and merge within a few days of the stable release. This is intentionally a near 1-to-1 migration (update what's there, not a redesign). I may follow up with a part 2 PR that briefly covers how to take advantage of v9, such as advanced state management and new utilities like createTableHook for better table-component reuse, each discussed briefly with links out to the official docs.

If you want a full migration guide to reference, see here

Dependency

  • Bump @tanstack/react-table to 9.0.0-beta.23 (pinned) in apps/v4, lockfile updated. This will change to 9.x.x
  • Add a temp minimumReleaseAgeExclude entry in pnpm-workspace.yaml, this must be removed before merging

Examples migrated to v9

  • All converted to the v9 idioms: declare features with tableFeatures(), build columns with createColumnHelper().columns([...]) (accessor/display) instead of ColumnDef[] annotations, useReactTable to useTable, table.getState() to table.state, flexRender retained.
  • Simple demos (6): registry/new-york-v4/examples/data-table-demo, examples/{base,radix}/data-table-{demo,rtl}, and the payments card.
  • Tasks example (9 files): new shared data-table-features.ts, columns.tsx, and the 5 reusable sub-components with feature-first generics (ReactTable/Column/Row<typeof features, …> and TData extends RowData), faceting enabled for the faceted filters.
  • dnd-kit dashboard (4 copies): getRowId preserved (drag reordering depends on it); faceting features dropped since there's no faceted UI ("include only what you use").

Docs updated

  • Both data-table.mdx guides (base + radix) rewritten for v9: new "Set up table features" step, helper-based column definitions, useTable, an aside noting the <table.FlexRender /> component alternative, and the beta install command.
  • Repointed tanstack.com/table/v8/... links to /latest in data-table.mdx and table.mdx.

Registry

  • Pinned @tanstack/react-table@9.0.0-beta.23 in the 3 block _registry.ts dependency strings. This will change to 9.x.x
  • Regenerated public/r/** via pnpm registry:build.

v9 specifics worth noting for reviewers

  • New generic shape is feature-first: ColumnDef<typeof features, TData>, etc.; generic components need TData extends RowData.
  • VisibilityState is now ColumnVisibilityState; .state lives on the ReactTable (adapter) type, not core Table; initialState.pagination now requires pageIndex.

Verification

  • pnpm typecheck passes (0 errors), pnpm lint passes, prettier --check passes, pnpm registry:build succeeds.
  • Manual browser pass still recommended pre-merge: /docs/components/data-table (incl. RTL preview), /examples/tasks (sorting, faceted filter counts, pagination, view options, selection), /examples/dashboard (drag-to-reorder).

Known follow-ups / open items

  • The legacy generated outputs under public/r/styles/{new-york,default}/ are git-tracked but no longer regenerated by registry:build (no source feeds them) and still contain v8 code. Decide whether to deprecate/remove or re-wire them into the build.
  • Possible part 2 PR: advanced state management and createTableHook for reusable table components (brief, with links to the official v9 docs).

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

@KevinVandy is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown
Contributor

Can you sign the commits please? See https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits. Thank you.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​tanstack/​react-table@​9.0.0-beta.2310010010097100

View full report

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