fix(mantine-react-table): don't force manual row modes when data is empty - #6547
fix(mantine-react-table): don't force manual row modes when data is empty#6547naughton wants to merge 1 commit into
Conversation
…mpty Forcing manualFiltering/Grouping/Pagination/Sorting when `data` is empty drops the row-model factories and fns from the `features` option at construction time. table-core freezes \_rowModelFns (aggregationFns/ filterFns/sortFns) when the table is constructed, so any table that mounts before its async data arrives (data: [] on first render, rows later) permanently loses client-side grouping, sorting, and filtering — the options heal on re-render but the frozen registries never do. The check was a v2-era perf hack; running the row-model pipelines over zero rows costs nothing, so it can simply be removed.
|
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)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe table options no longer set all manual processing flags when ChangesTable Options
Estimated code review effort: 1 (Trivial) | ~5 minutes Mergeability Score: ⚪ Minimal · up to This localized change removes empty-data mode forcing so client-side row features remain available when data loads asynchronously; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 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 |
Forcing manualFiltering/Grouping/Pagination/Sorting when
datais empty drops the row-model factories and fns from thefeaturesoption at construction time. table-core freezes _rowModelFns (aggregationFns/ filterFns/sortFns) when the table is constructed, so any table that mounts before its async data arrives (data: [] on first render, rows later) permanently loses client-side grouping, sorting, and filtering — the options heal on re-render but the frozen registries never do.The check was a v2-era perf hack; running the row-model pipelines over zero rows costs nothing, so it can simply be removed.
Summary by CodeRabbit