Skip to content

fix(mantine-react-table): map multi-select filterVariant to arrHas - #6546

Open
naughton wants to merge 1 commit into
TanStack:mainfrom
naughton:fix/mrt-multiselect-arrhas
Open

fix(mantine-react-table): map multi-select filterVariant to arrHas#6546
naughton wants to merge 1 commit into
TanStack:mainfrom
naughton:fix/mrt-multiselect-arrhas

Conversation

@naughton

@naughton naughton commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

filterVariant: 'multi-select' resolved to the arrIncludesSome filter fn. In v8 that fn happened to work on scalar cell values because it leaned on String.prototype.includes, but the v9 implementation hard-requires an array data value (if (!Array.isArray(dataValue)) return false), so a multi-select filter applied to a plain string/number column filters out every row and blanks the table.

v9 added arrHas ('keeps rows whose scalar column value equals at least one filter value'), which is exactly the multi-select semantic — a cell holding one value matched against the array of selected options.

Summary by CodeRabbit

  • Bug Fixes
    • Improved filtering for multi-select columns to return more accurate results.
    • Updated behavior to correctly handle selected values and scalar entries.

filterVariant: 'multi-select' resolved to the arrIncludesSome filter fn.
In v8 that fn happened to work on scalar cell values because it leaned
on String.prototype.includes, but the v9 implementation hard-requires an
array data value (`if (!Array.isArray(dataValue)) return false`), so a
multi-select filter applied to a plain string/number column filters out
every row and blanks the table.

v9 added arrHas ('keeps rows whose scalar column value equals at least
one filter value'), which is exactly the multi-select semantic — a cell
holding one value matched against the array of selected options.
@coderabbitai

coderabbitai Bot commented Aug 13, 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: 7ddff2b9-7ef0-4aab-8a33-8cd279f7fcbc

📥 Commits

Reviewing files that changed from the base of the PR and between b86766b and ad0ecac.

📒 Files selected for processing (1)
  • examples/react/mantine-react-table/src/mantine-react-table/utils/column.utils.ts

📝 Walkthrough

Walkthrough

The default filter function for multi-select columns now uses arrHas instead of arrIncludesSome. Comments document scalar-value compatibility and multi-select behavior.

Changes

Multi-select filter matching

Layer / File(s) Summary
Update multi-select filter function
examples/react/mantine-react-table/src/mantine-react-table/utils/column.utils.ts
getDefaultColumnFilterFn now returns arrHas for multi-select filters and documents scalar-value compatibility.

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

Mergeability Score: ⚪ Minimal · up to ad0ec

This is a localized filter-mapping correction with no actionable merge-blocking risk remaining; it is merge-ready after normal checks and review.

Suggested reviewers: kevinvandy

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the code change and motivation but omits the required Changes, Checklist, and Release Impact sections. Add the template sections and complete the checklist, including local test status and whether a changeset is required.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the change from multi-select filtering to the arrHas filter function.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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