iTwin/iTwinUI-react

Shift selection ignores any ctrl/checkbox/toggle selections in multi selection mode table

Closed this issue · 2 comments

Describe the bug (actual behavior)

When using multi selection mode table, clicking more than one item (using ctrl or checkbox), and then using shift selection, it ignores any other selected items and takes the first selected item as a starting point for the shift range.
image

Expected behavior

Shift should take the last selected item as a starting point for range selection

Steps to reproduce
  1. Select any row
  2. Select a second row using the checkbox or ctrl
  3. Use shift to select any row
Additional information

Related issue #880

Hi @ainepi, I made a PR #886 for your Ctrl + Shift click issue #880. For this issue, I made a commit on the rohan/table-shift-click-checkbox-bug branch. This is not complete but I think it implements a majority of the fix.

I could make a PR from that branch to main, or if you feel like it, you can make your own PR, possibly using my branch for ideas. (We encourage external contributions 🙂). Please let me know what you prefer.

@ainepi As we discussed via chat, I made PR #889. Feel free to comment on that PR if you have any comments/suggestions.