Skip to content

fix(table-core): honor explicit global filter opt-in - #6439

Merged
KevinVandy merged 2 commits into
betafrom
agent/fix-4673-explicit-global-filter
Jul 30, 2026
Merged

fix(table-core): honor explicit global filter opt-in#6439
KevinVandy merged 2 commits into
betafrom
agent/fix-4673-explicit-global-filter

Conversation

@KevinVandy

@KevinVandy KevinVandy commented Jul 18, 2026

Copy link
Copy Markdown
Member

Summary

  • let an explicit per-column global-filter opt-in bypass the default primitive-value heuristic
  • preserve table-wide filtering controls and custom column eligibility predicates
  • cover object-valued custom global filtering at the capability and row-model levels

Rationale

By default, global filtering still only opts primitive string and number accessor values in automatically. When a column explicitly sets enableGlobalFilter to true, however, rejecting it with that same heuristic is surprising and prevents a custom globalFilterFn from handling object or array values. This change treats the explicit flag as an override of only the built-in heuristic; custom getColumnCanGlobalFilter policies remain authoritative.

Validation

  • 48 focused Vitest tests passed
  • table-core TypeScript check passed
  • ESLint passed for changed files
  • Prettier check passed for changed files
  • git diff --check passed

Closes #4673

Summary by CodeRabbit

  • Bug Fixes

    • Columns with enableGlobalFilter: true can now participate in global filtering even when their values are objects, booleans, or other non-string/non-number types.
    • Custom global-filter eligibility rules can still override individual column settings.
  • Tests

    • Added coverage for opt-in filtering of non-standard value types and custom eligibility behavior.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ac372c7d-cd72-4388-ab06-ff178874a6c9

📥 Commits

Reviewing files that changed from the base of the PR and between 05edac5 and 6031818.

📒 Files selected for processing (3)
  • packages/table-core/src/features/global-filtering/globalFilteringFeature.ts
  • packages/table-core/tests/implementation/features/column-filtering/createFilteredRowModel.test.ts
  • packages/table-core/tests/unit/features/global-filtering/globalFilteringFeature.utils.test.ts

📝 Walkthrough

Walkthrough

Global filter eligibility now honors enableGlobalFilter: true before type-based detection. Tests cover opt-in for boolean and object-valued columns, plus custom predicate precedence.

Changes

Global filter opt-in

Layer / File(s) Summary
Eligibility override and filtering coverage
packages/table-core/src/features/global-filtering/globalFilteringFeature.ts, packages/table-core/tests/unit/features/global-filtering/globalFilteringFeature.utils.test.ts, packages/table-core/tests/implementation/features/column-filtering/createFilteredRowModel.test.ts
getColumnCanGlobalFilter accepts explicit column opt-in, with tests covering boolean columns, custom predicate rejection, and object-valued filtering.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: honoring explicit global filter opt-in.
Linked Issues check ✅ Passed Explicit enableGlobalFilter:true now lets object-valued columns participate in global filtering, matching the linked bug fix.
Out of Scope Changes check ✅ Passed All production and test changes are directly related to global filtering behavior and its coverage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/fix-4673-explicit-global-filter

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.

@nx-cloud

nx-cloud Bot commented Jul 18, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 6031818

Command Status Duration Result
nx affected --targets=test:eslint,test:sherif,t... ✅ Succeeded 7m 41s View ↗
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 53s View ↗

☁️ Nx Cloud last updated this comment at 2026-07-30 22:22:19 UTC

@pkg-pr-new

pkg-pr-new Bot commented Jul 18, 2026

Copy link
Copy Markdown
More templates

@tanstack/alpine-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/alpine-table@6439

@tanstack/angular-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/angular-table@6439

@tanstack/angular-table-devtools

npm i https://pkg.pr.new/TanStack/table/@tanstack/angular-table-devtools@6439

@tanstack/ember-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/ember-table@6439

@tanstack/lit-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/lit-table@6439

@tanstack/match-sorter-utils

npm i https://pkg.pr.new/TanStack/table/@tanstack/match-sorter-utils@6439

@tanstack/preact-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/preact-table@6439

@tanstack/preact-table-devtools

npm i https://pkg.pr.new/TanStack/table/@tanstack/preact-table-devtools@6439

@tanstack/react-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/react-table@6439

@tanstack/react-table-devtools

npm i https://pkg.pr.new/TanStack/table/@tanstack/react-table-devtools@6439

@tanstack/solid-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/solid-table@6439

@tanstack/solid-table-devtools

npm i https://pkg.pr.new/TanStack/table/@tanstack/solid-table-devtools@6439

@tanstack/svelte-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/svelte-table@6439

@tanstack/table-core

npm i https://pkg.pr.new/TanStack/table/@tanstack/table-core@6439

@tanstack/table-devtools

npm i https://pkg.pr.new/TanStack/table/@tanstack/table-devtools@6439

@tanstack/vue-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/vue-table@6439

@tanstack/vue-table-devtools

npm i https://pkg.pr.new/TanStack/table/@tanstack/vue-table-devtools@6439

commit: 6031818

@KevinVandy
KevinVandy marked this pull request as ready for review July 30, 2026 22:11
@KevinVandy
KevinVandy merged commit 4cb3a7d into beta Jul 30, 2026
9 checks passed
@KevinVandy
KevinVandy deleted the agent/fix-4673-explicit-global-filter branch July 30, 2026 23:57
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.

Global filter doesn't run when accessor key points to an object

1 participant