Skip to content

Commit 86270e2

Browse files
CAVY Benjamin (V)CAVY Benjamin (V)
CAVY Benjamin (V)
authored and
CAVY Benjamin (V)
committed
Fixes #912
1 parent ef26846 commit 86270e2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/TableRow.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,24 @@ class TableRow extends Component {
3939
if (e.target.tagName !== 'INPUT' &&
4040
e.target.tagName !== 'SELECT' &&
4141
e.target.tagName !== 'TEXTAREA') {
42-
const rowIndex = e.currentTarget.rowIndex + 1;
42+
const rowIndex = this.props.index;
4343
if (this.props.onRowDoubleClick) {
4444
this.props.onRowDoubleClick(rowIndex);
4545
}
4646
}
4747
}
4848

4949
rowMouseOut = e => {
50+
const rowIndex = this.props.index;
5051
if (this.props.onRowMouseOut) {
51-
this.props.onRowMouseOut(e.currentTarget.rowIndex, e);
52+
this.props.onRowMouseOut(rowIndex, e);
5253
}
5354
}
5455

5556
rowMouseOver = e => {
57+
const rowIndex = this.props.index;
5658
if (this.props.onRowMouseOver) {
57-
this.props.onRowMouseOver(e.currentTarget.rowIndex, e);
59+
this.props.onRowMouseOver(rowIndex, e);
5860
}
5961
}
6062

0 commit comments

Comments
 (0)