Uh oh!
There was an error while loading. Please reload this page.
fix sorting replacement in single-sort mode - #6431
Conversation
📝 WalkthroughWalkthrough
ChangesRow sorting toggle behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
View your CI Pipeline Execution ↗ for commit 06353c5
☁️ Nx Cloud last updated this comment at |
Uh oh!
There was an error while loading. Please reload this page.
What changed
Why
toggleSorting(..., false)previously kept the other sorted columns when the target column was already the final entry. The action was classified as a toggle, and the toggle path mapped over the entire previous state.Single-sort actions should leave at most the selected column in the sorting state, regardless of its prior position.
Validation
packages/table-core/tests/unit/features/row-sorting/rowSortingFeature.utils.test.ts— 47 tests passedgit diff --checkCloses#4309
Summary by CodeRabbit
Bug Fixes
Tests