How to get a collection of items from a list with ‘group/block’ select.
Assume using REACT to render a sorted list where each item can be selected with mouse click. The selector is an ‘id’ which was assigned with building the list before sorting/rendering. Already a function is assigned for using event.ctrlKey, event.metaKey etc to perform actions on one of the selected items.
Question is how to get a continuous group/block of items of the displayed list which were selected with previous common used action with ‘shift’ and ‘left mouse click’.
Searching the web didn’t gave examples with plain vanilla react, only some libs (eg. npm-based) not looking simple and maybe a bit of an overkill.
Any idea? reference?