Skip to content

fix(table-core): refresh faceted values on option updates#6417

Draft
wanxiankai wants to merge 1 commit into
TanStack:mainfrom
wanxiankai:fix/faceted-unique-values-rerender
Draft

fix(table-core): refresh faceted values on option updates#6417
wanxiankai wants to merge 1 commit into
TanStack:mainfrom
wanxiankai:fix/faceted-unique-values-rerender

Conversation

@wanxiankai

Copy link
Copy Markdown

🎯 Changes

Fixes #6081.

Custom getFacetedUniqueValues factories are now refreshed when the table option changes. This prevents column and global faceting APIs from retaining a getter created during the first React render while still preserving the cached getter when the factory reference is unchanged.

The root cause was that column and global faceting captured the initial factory result during table construction. Although useReactTable updates table.options on every render, those cached getters were never rebuilt.

This PR also adds a regression test covering option updates for both column and global faceted unique values, including verification that unchanged factories remain cached, plus a patch changeset for @tanstack/table-core.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c7880469-df2c-4822-afba-ea3fafcb79bc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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