Skip to content

Commit 7c0f607

Browse files
authored
feat: Allow row selection in data browser by dragging mouse outside of selection box column (#2716)
1 parent 31b915a commit 7c0f607

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/components/BrowserRow/BrowserRow.react.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export default class BrowserRow extends Component {
5050
onMouseDownRowCheckBox,
5151
onMouseUpRowCheckBox,
5252
onMouseOverRowCheckBox,
53+
onMouseOverRow,
5354
} = this.props;
5455
const attributes = obj.attributes;
5556
let requiredCols = [];
@@ -69,7 +70,7 @@ export default class BrowserRow extends Component {
6970
requiredCols = ['authData'];
7071
}
7172
return (
72-
<div className={styles.tableRow} style={{ minWidth: rowWidth }}>
73+
<div className={styles.tableRow} style={{ minWidth: rowWidth }} onMouseOver={() => onMouseOverRow(obj.id)}>
7374
<span
7475
className={styles.checkCell}
7576
onMouseUp={onMouseUpRowCheckBox}

src/dashboard/Data/Browser/Browser.react.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,6 +2078,7 @@ class Browser extends DashboardView {
20782078
showNote={this.showNote}
20792079
onMouseDownRowCheckBox={this.onMouseDownRowCheckBox}
20802080
onMouseUpRowCheckBox={this.onMouseUpRowCheckBox}
2081+
onMouseOverRow={this.onMouseOverRowCheckBox}
20812082
onMouseOverRowCheckBox={this.onMouseOverRowCheckBox}
20822083
classes={this.classes}
20832084
classwiseCloudFunctions={this.state.classwiseCloudFunctions}

src/dashboard/Data/Browser/BrowserTable.react.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ export default class BrowserTable extends React.Component {
180180
onMouseDownRowCheckBox={this.props.onMouseDownRowCheckBox}
181181
onMouseUpRowCheckBox={this.props.onMouseUpRowCheckBox}
182182
onMouseOverRowCheckBox={this.props.onMouseOverRowCheckBox}
183+
onMouseOverRow={this.props.onMouseOverRow}
183184
setShowAggregatedData={this.props.setShowAggregatedData}
184185
setErrorAggregatedData={this.props.setErrorAggregatedData}
185186
firstSelectedCell={this.props.firstSelectedCell}
@@ -260,6 +261,7 @@ export default class BrowserTable extends React.Component {
260261
onMouseDownRowCheckBox={this.props.onMouseDownRowCheckBox}
261262
onMouseUpRowCheckBox={this.props.onMouseUpRowCheckBox}
262263
onMouseOverRowCheckBox={this.props.onMouseOverRowCheckBox}
264+
onMouseOverRow={this.props.onMouseOverRow}
263265
setShowAggregatedData={this.props.setShowAggregatedData}
264266
setErrorAggregatedData={this.props.setErrorAggregatedData}
265267
firstSelectedCell={this.props.firstSelectedCell}
@@ -349,6 +351,7 @@ export default class BrowserTable extends React.Component {
349351
onMouseDownRowCheckBox={this.props.onMouseDownRowCheckBox}
350352
onMouseUpRowCheckBox={this.props.onMouseUpRowCheckBox}
351353
onMouseOverRowCheckBox={this.props.onMouseOverRowCheckBox}
354+
onMouseOverRow={this.props.onMouseOverRow}
352355
setShowAggregatedData={this.props.setShowAggregatedData}
353356
setErrorAggregatedData={this.props.setErrorAggregatedData}
354357
firstSelectedCell={this.props.firstSelectedCell}

0 commit comments

Comments
 (0)