swimlane / ngx-datatable

✨ A feature-rich yet lightweight data-table crafted for Angular
http://swimlane.github.io/ngx-datatable/
MIT License
4.63k stars 1.68k forks source link

disable shift key on multi select #982

Open nickhellmich opened 7 years ago

nickhellmich commented 7 years ago

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior Using shift when selecting will not work with scrolling or paging. As in, you can't click on one item, scroll down or page forward/back, click another record, and have all the records in between selected.

Additionally, you can't use ctrl + shift to include a range of items to a current selection. When shift is used, the current selection will be replaced by the new selection rather than appended.

Expected behavior Allow the grid to be configured where the user can multi select, but not select ranges of rows using the shift key.

Reproduction of the problem The site demos will show this behavior but this is a follow up on this issue: https://github.com/swimlane/ngx-datatable/issues/974

What is the motivation / use case for changing the behavior? We have an app that will populate many records into a scrolling grid. We have a requirement that the users should be able to select large collections of rows, which sometimes requires scrolling. When the user selects with shift+, scrolls, then selects, they don't realize only the visible records (paraphrasing on what the behavior actually is) are selected.

As a result, it would be preferable to at least turn off the shift key detection and make the user select records individually using the ctrl key.

Please tell us about your environment: Windows

mxchange commented 6 years ago

I second this option to disable shift for selectionType:multiClick, maybe an alternative multiClickNoShift