iTwin / presentation

Monorepo for iTwin.js Presentation Library
https://www.itwinjs.org/presentation/
MIT License
4 stars 0 forks source link

`ControlledTree`: Shift selection doesn't load/select intermediate nodes #608

Closed grigasp closed 5 months ago

grigasp commented 5 months ago

Describe the bug

When shift-selecting a range of nodes, where the middle of the range contains not loaded nodes, the tree selects only the loaded ones. Then, when scrolled to the ones that are not loaded, they do get loaded, but aren't selected.

To Reproduce

  1. Open a delay-loaded ControlledTree component with a large hierarchy level.
  2. Click on one of the nodes.
  3. Quickly scroll down to avoid intermediate nodes getting loaded.
  4. Shift-select the last node - notice the nodes are now selected.
  5. Scroll up - notice the nodes that weren't loaded at the time of shift+click are not selected.

Expected Behavior

Shift+select should cause the nodes to be loaded and selected.

Screenshots

2024-05-27_08-19-53

Desktop (please complete the applicable information)

Additional context

No response