fix(table-core): use autoRemove instead of resolveFilterValue on comparison filter fns#6213
fix(table-core): use autoRemove instead of resolveFilterValue on comparison filter fns#6213rkdfx wants to merge 1 commit intoTanStack:alphafrom
Conversation
…arison filter fns filterFn_greaterThan, filterFn_greaterThanOrEqualTo, filterFn_lessThan, and filterFn_lessThanOrEqualTo incorrectly used .resolveFilterValue instead of .autoRemove. This corrupted filter values — e.g. "price > 50" became "price > false" (coerced to "price > 0") because testFalsy(50) returns false, and false is not nullish so the ?? fallback doesn't apply. Fixes TanStack#6212
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughFour numeric comparison filter functions ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Changes
filterFn_greaterThan,filterFn_greaterThanOrEqualTo,filterFn_lessThan, andfilterFn_lessThanOrEqualToincorrectly used.resolveFilterValueinstead of.autoRemoveresolveFilterValuetransforms the filter value before comparison, sotestFalsy(50)returnsfalse, andfalse ?? 50evaluates tofalse(not nullish), making the comparisonrowValue > 0instead ofrowValue > 50.autoRemoveFixes #6212
Checklist
pnpm test:pr.Summary by CodeRabbit