Uh oh!
There was an error while loading. Please reload this page.
fix(table-core): preserve columnFiltersMeta in filterRowModelFromLeafs - #6557
fix(table-core): preserve columnFiltersMeta in filterRowModelFromLeafs#6557ErfanBagheri404 wants to merge 1 commit into
Conversation
FixesTanStack#6074 filterFromLeafRows recreates each row via constructRow and copies columnFilters, but neglects to copy columnFiltersMeta. Users who store filter-rank metadata (e.g. for fuzzy-sort use cases) find their data wiped on every filter recalculation. Copy columnFiltersMeta alongside columnFilters when building the filtered row model from leaf rows.
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)
📝 WalkthroughWalkthroughLeaf-first filtering now copies ChangesColumn filter metadata
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk:⚪ Minimal · up to This is a localized metadata-preservation fix with no actionable merge-blocking risk remaining beyond normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
MILLERMARRU
left a comment
There was a problem hiding this comment.
I pulled the current filterRowsUtils.ts and confirmed the gap directly: filterRowModelFromRoot and filterRowModelFromLeafs both reconstruct rows via constructRow, but only the leaf-up path drops columnFiltersMeta on the copy while keeping columnFilters. Anything that reads per-row filter match metadata (e.g. highlighting the matched substring for a fuzzy filter) would silently lose it whenever filterFromLeafRows is enabled, with no equivalent loss in the root-down path. The fix is a one-line, symmetric addition that matches how columnFilters is already handled two lines above, so it's low risk.
Fixes#6074
When
filterFromLeafRowsis true,filterRowModelFromLeafsrecreates each row viaconstructRowand copiescolumnFilters, but neglects to copycolumnFiltersMeta. Users who store filter-rank metadata (e.g. for fuzzy-sort use cases) find their data wiped on every filter recalculation.Copy
columnFiltersMetaalongsidecolumnFilterswhen building the filtered row model from leaf rows.Summary by CodeRabbit