Skip to content

fix: restore server-provided counts in values filters - #31

Open
SyedSibtainRazvi wants to merge 3 commits into
mainfrom
fix/server-filter-counts
Open

SyedSibtainRazvi wants to merge 3 commits into
mainfrom
fix/server-filter-counts

Conversation

@SyedSibtainRazvi

@SyedSibtainRazvi SyedSibtainRazvi commented Dec 1, 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

  • Apps can pass a facetedUniqueValues factory to useSheet so the values filter can list choices and counts from the full server result. By default it still counts the loaded rows.

Additional info

  • The regression test opens the Status filter, refreshes the server counts on the mounted sheet, and checks that a choice absent from the loaded rows appears. It failed before the fix.
  • The README shows how the getter can read current counts from table.options.meta.
  • Local checks passed, including Chromium e2e and axe, fresh declaration builds for Sheets and the playground, formatting, Nx sync, knip, and a typecheck of the new README example.

Checklist

  • Tests
  • Translations (N/A)
  • Documentation
  • Uploaded screenshots (N/A)
  • Verified on preview url once (N/A for this hook change)

Screenshots

Page(s) if applicable

The existing values filter displays the supplied counts using its current layout.

TanStack reads a table's features once, when it creates the table, so a factory passed on a later render was ignored while the useMemo suggested otherwise. The JSDoc now says it's read once.
@SyedSibtainRazvi SyedSibtainRazvi self-assigned this Dec 2, 2026
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.

useSheet: allow supplying faceted unique values for server-side filtering (regression in 0.4.0)

1 participant