Closed ghiscoding closed 5 months ago
Run & review this pull request in StackBlitz Codeflow.
@zewa666 I wouldn't mind a review on this PR since I know you use this feature too and want to make sure it's safe to do so. See #1537 for more info. I'm not sure if the name preventDragFromKeys
is meaningful enough though, however I do want to keep it short (with time I realized that super long prop name are never minimized, so better keep it short)
Side note, it turns out that the over the top answer I provided to the SO with SQL LIKE, was so happy that he sent me a bunch of Ko-Fi ☕, so I'm happy too 😉
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.8%. Comparing base (
a2799f2
) to head (7f5223b
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I might need to change the keys to only prevent drag on Ctrl key and leave Shift as allowed to drag. Since that seems to cause friction by the user in the discussion
I've tried out the stackblitz PR review and did so for both Example 17 and Example 19 where I had somewhat similar issues. Both work fine. I couldn't replicate the shift behavior as mentioned in the other discussion but holding shift and clicking around in general causes weird text selections to happen so I didn't give that much thought anyways. But since it's configurable I don't see any big issues with not including it as default since the consumer can always decide which keys to take
onCellRangeSelecting
and then the SlickRowSelectionModel assumes it's a new range from a mouse drag and override the previous range. However we should really prevent this mouse drag from happening when the user is pressing the Ctrl/Shift keys to avoid having the issue brought in #1537