fix(mantine-react-table): map multi-select filterVariant to arrHas - #6546
fix(mantine-react-table): map multi-select filterVariant to arrHas#6546naughton wants to merge 1 commit into
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe default filter function for ChangesMulti-select filter matching
Estimated code review effort: 2 (Simple) | ~5 minutes Mergeability Score: ⚪ Minimal · up to 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: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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