SlickGrid
SlickGrid copied to clipboard
multiSelect: false option should disable SHIFT + Arrow key too
When using multiSelect: false, the SHIFT + mouse click and CTRL + mouse click are disabled, but you can multi select with SHIFT + Arrow down/up. I think it is a bug.
This is not the most elegant fix but
replace the rowselectionmodel line 123
if (active >= 0 && active < _grid.getDataLength()) {
_grid.scrollRowIntoView(active);
var tempRanges = rowsToRanges(getRowsRange(top, bottom));
setSelectedRanges(tempRanges);
}
With the following which updates the top and bottom to the active if multi is false.
if (active >= 0 && active < _grid.getDataLength()) {
_grid.scrollRowIntoView(active);
if (!_grid.getOptions().multiSelect) {
top = active;
bottom = active;
}
var tempRanges = rowsToRanges(getRowsRange(top, bottom));
setSelectedRanges(tempRanges);
}