Skip to content
Source
Sign inSign up
TanStack/table

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

Closedwanxiankai(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/6417/headopened

🎯 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).
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on base/target branches other than the default branch.

      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 Plus

      Run ID: 82697ec6-7177-4cf3-a53e-ca10ed4c2baa

      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.
    2. KevinVandy closed this

Sign in to join this conversation.