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
This commit is contained in:
committed by
Facebook Github Bot
parent
d6bb5e5d32
commit
3f1ab6be47
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user