Fix Unwanted Highlight in ManagedTable
Summary: Previously, rows got highlighted after switching between data for `ManagedTable` even though `highlightableRows` was set to false. This diff forces the highlighting not to happen when the value is set to false Reviewed By: mweststrate Differential Revision: D21720266 fbshipit-source-id: 534944fe03ad1561bc2109468ae6c4c5f3fc947d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2283bbd313
commit
dec5045fca
@@ -402,6 +402,10 @@ export class ManagedTable extends React.Component<
|
||||
}
|
||||
|
||||
onHighlight = (e: React.MouseEvent, row: TableBodyRow, index: number) => {
|
||||
if (!this.props.highlightableRows) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.shiftKey) {
|
||||
// prevents text selection
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user