Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.4k
fix : toggleAllRowsSelected should respect row selection rules#6129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
fix : toggleAllRowsSelected should respect row selection rules#6129
Uh oh!
There was an error while loading.Please reload this page.
Conversation
changeset-botbot commentedNov 27, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
🦋 Changeset detectedLatest commit:34d1711 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means?Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
coderabbitaibot commentedNov 27, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
WalkthroughWhen toggling "select all" off, the code now skips rows that cannot be selected (rows where Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for usingCodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Uh oh!
There was an error while loading.Please reload this page.
🎯 Changes
This pull request improves the row selection feature in the table core package by ensuring that selection and deselection operations respect the
enableRowSelectionconfiguration. It also adds comprehensive tests to verify this behavior for both selecting and deselecting all rows.Bug Explanation:
When a row is selected and enableRowSelection is set to false, the row should remain selected because selection is supposed to be locked/disabled. However, when the user triggers Unselect All, the row becomes unselected even though selection is disabled.
Expected Behavior:
The row should remain selected when enableRowSelection = false, and the “Unselect All” action should not clear its selection state.
Actual Behavior:
The row is still unselected after “Unselect All,” meaning the selection state is not being preserved when selection is disabled.
Demo
tanstack-table-bug.mov
=> In demo, the row
Barneyshould not be unselectedTesting Enhancements:
RowSelection.test.tsto verify thattoggleAllRowsSelectedcorrectly respects theenableRowSelectionsetting when selecting all rows, ensuring non-selectable rows remain unaffected.enableRowSelection) retain their selection state.✅ Checklist
pnpm test:pr.🚀 Release Impact
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.