From 3f1ab6be47b637b6f30db5d0e935ee78f1b905f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=BCchele?= Date: Wed, 19 Jun 2019 06:20:25 -0700 Subject: [PATCH] fix range select Summary: Where was a bug, where a range selection using the shift key wasn't working, when the start of the selection was outside the viewport. The problem was caused by `selectInRange` firing twice, the second time with wrong arguments. In this diff, we are not firing the `onMouseEnterRow` handler, when the shift key is pressed. Reviewed By: jknoxville Differential Revision: D15897880 fbshipit-source-id: 95402dcbe9f8ce691be16cfd103918b09ff9e75c --- src/ui/components/table/ManagedTable.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/components/table/ManagedTable.js b/src/ui/components/table/ManagedTable.js index 165ed9a4c..f37cf8e40 100644 --- a/src/ui/components/table/ManagedTable.js +++ b/src/ui/components/table/ManagedTable.js @@ -478,7 +478,8 @@ class ManagedTable extends React.Component< dragStartIndex && current && this.props.multiHighlight && - this.props.highlightableRows + this.props.highlightableRows && + !e.shiftKey // When shift key is pressed, it's a range select not a drag select ) { current.scrollToItem(index + 1); const startKey = this.props.rows[dragStartIndex].key;