FlowingCode / GridHelpers

Several grid recipes for Vaadin 23+ (and 22), ready to use. DOES NOT require extending Grid.
https://addonsv23.flowingcode.com/grid-helpers
Apache License 2.0
12 stars 1 forks source link

Releasing shift key deselects current shift-based selection #64

Closed mlopezFC closed 1 year ago

mlopezFC commented 1 year ago

When using Enhanced selection + Selection by clicking row + Arrow selection, if you select a range by holding the shift key, when you release the shift key the selection disappears.

javier-godoy commented 1 year ago

~Bug confirmed in version 1.0.0 (Vaadin 23.3 and 24)~

flang commented 1 year ago

There's already a warning that enabling "Enhanced selection" + "Selection by clicking row" could lead to some unwanted side effects.

https://github.com/FlowingCode/GridHelpers/blob/609bf56244994b1594654967bcefe159ccf83d62/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java#L192

We could add a constraint to ignore "Selection by clicking row" if "Enhanced selection" is enabled.

javier-godoy commented 1 year ago

There's already a warning that enabling "Enhanced selection" + "Selection by clicking row" could lead to some unwanted side effects.

Good catch.

We could add a constraint to ignore "Selection by clicking row" if "Enhanced selection" is enabled.

Both features are opt-in. Since both don't work together, I would consider this ticket as a feature request. Meanwhile, we can add some visible warning in the "all features" demo.

IIRC, the selection only dissapears from the UI when Shift is released, but the rows remain selected in the server-side, which still allows you to perform some action upon them (although with horrible UX).