fix: respect multiSelect in checkbox and row keyboard selection#2573
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2573 +/- ##
=======================================
Coverage 100.0% 100.0%
=======================================
Files 196 196
Lines 25275 25277 +2
Branches 8925 8923 -2
=======================================
+ Hits 25275 25277 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
angular-slickgrid
aurelia-slickgrid
slickgrid-react
slickgrid-vue
@slickgrid-universal/angular-row-detail-plugin
@slickgrid-universal/aurelia-row-detail-plugin
@slickgrid-universal/react-row-detail-plugin
@slickgrid-universal/vue-row-detail-plugin
@slickgrid-universal/binding
@slickgrid-universal/common
@slickgrid-universal/composite-editor-component
@slickgrid-universal/custom-footer-component
@slickgrid-universal/custom-tooltip-plugin
@slickgrid-universal/empty-warning-component
@slickgrid-universal/event-pub-sub
@slickgrid-universal/excel-export
@slickgrid-universal/graphql
@slickgrid-universal/odata
@slickgrid-universal/pagination-component
@slickgrid-universal/pdf-export
@slickgrid-universal/row-detail-view-plugin
@slickgrid-universal/rxjs-observable
@slickgrid-universal/sql
@slickgrid-universal/text-export
@slickgrid-universal/utils
@slickgrid-universal/vanilla-bundle
@slickgrid-universal/vanilla-force-bundle
commit: |
|
@zewa666 @jr01 this PR is another one of those vide coded fix by copilot for super old SlickGrid (6pac repo) issues, the issue was legit and the fix is now displaying the correct behavior. This might surprise some users, for example I was wrongly setting
|
|
thx a bunch for the heads up |
|
🎉 This pull request is included in version 10.7.0 📦 |
fixes an old issue opened in SlickGrid (6pac) project: 6pac/SlickGrid#345
vibe coded a fix with Copilot
Summary
This change fixes checkbox row selection behavior so it correctly follows the grid
multiSelectoption.multiSelectis true:multiSelectis false:multiSelectis false.Root cause
Checkbox toggling previously always used additive selection logic, even when
multiSelectwas disabled.Also, row keyboard range selection had logic gaps for single-select mode in the merged hybrid selection model.
Repro steps (before fix)
multiSelectto false.Optional keyboard repro:
multiSelectfalse.Expected behavior (after fix)
multiSelectfalse, selecting row B after row A keeps only row B selected.What was changed
multiSelect:[row]or[]selection only.multiSelectis false.Validation
I'll need to add a note warning on the next release:
multiSelectOption Now Properly EnforcedThe
multiSelectoption is now properly respected. If you previously setmultiSelect: falseexpecting it to work differently, this will now correctly enforce single-row-only selection. To allow multiple row selection while preventing the currently-active row from being automatically selected during navigation, useselectionOptions.selectActiveRow: falseinstead (keepingmultiSelectat its defaulttrue).This makes it clearer that
selectActiveRow: falseis specifically about navigation behavior (not auto-selecting as you arrow through rows), whereasmultiSelectis about how many rows you can select in total.