Skip to content

Conversation

@linl33
Copy link

@linl33 linl33 commented Dec 15, 2025

🎯 Changes

Pass column object as the second argument to filterFn resolveFilterValue as described by its type ColumnFilterAutoRemoveTestFn.

Ref: #4834

✅ 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).

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Fixed filter resolution to properly include column context information in all filtering operations. Column-specific and global filters now receive the complete column data required, improving overall filtering accuracy and consistency. This enhancement enables more precise filter behavior across the table.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Dec 15, 2025

🦋 Changeset detected

Latest commit: 7b603d5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@tanstack/table-core Patch
@tanstack/angular-table Patch
@tanstack/lit-table Patch
@tanstack/qwik-table Patch
@tanstack/react-table Patch
@tanstack/solid-table Patch
@tanstack/svelte-table Patch
@tanstack/vue-table Patch
@tanstack/react-table-devtools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Dec 15, 2025

Walkthrough

A patch release for @tanstack/table-core that updates resolveFilterValue calls in the filtered row model to pass the column context as an additional parameter in both per-column and global filter paths.

Changes

Cohort / File(s) Summary
Changeset declaration
\.changeset/flat-regions-buy.md``
New changeset file declaring a patch release with message: "fix(table-core): Pass column to resolveFilterValue"
Filter resolution updates
\packages/table-core/src/utils/getFilteredRowModel.ts``
Updated two resolveFilterValue call sites to pass column as an additional parameter: one for per-column filters and one for global filters

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that the resolveFilterValue function signature accepts the column parameter in both call contexts
  • Confirm that both per-column and global filter paths correctly pass the column reference
  • Ensure the changeset version bump and message align with the fix

Poem

🐰 A column context passed with care,
Through filters now, both here and there—
The rabbit hops with joy so bright,
For patches that make logic right! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: passing the column parameter to resolveFilterValue in table-core.
Description check ✅ Passed The description covers all required template sections with complete information: changes explained with context reference, contribution checklist completed, and release impact documented with changeset generated.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e172109 and 7b603d5.

📒 Files selected for processing (2)
  • .changeset/flat-regions-buy.md (1 hunks)
  • packages/table-core/src/utils/getFilteredRowModel.ts (2 hunks)
🔇 Additional comments (3)
packages/table-core/src/utils/getFilteredRowModel.ts (2)

49-53: Column filter resolveFilterValue now has column context (value, column) – looks correct

resolvedValue: filterFn.resolveFilterValue?.(d.value, column) ?? d.value keeps the previous nullish fallback while finally giving resolveFilterValue the column it may need. column is already validated above, so this is safe and aligns runtime behavior with a column-aware resolver.


71-77: Global filter resolveFilterValue also receives column context – consistent with column path

For global filters, globalFilterFn.resolveFilterValue?.(globalFilter, column) ?? globalFilter mirrors the column-filter behavior and lets a single global resolver specialize by column if desired. globallyFilterableColumns guarantees a defined column, so this is a straightforward, backward-compatible enhancement.

.changeset/flat-regions-buy.md (1)

1-5: Changeset accurately reflects the scoped runtime fix

Patch bump for @tanstack/table-core with message “Pass column to resolveFilterValue” matches the code change and is appropriately classified as a patch.


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 and usage tips.

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