Skip to content

Commit 93c7efb

Browse files
committed
fix wrong position when enable cell edit and expand column
1 parent 7320dd4 commit 93c7efb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/TableBody.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,9 @@ class TableBody extends Component {
257257

258258
handleRowClick = (rowIndex, cellIndex) => {
259259
const { onRowClick } = this.props;
260-
onRowClick(this.props.data[rowIndex - 1],
261-
rowIndex - 1, this._isSelectRowDefined() ? cellIndex - 1 : cellIndex);
260+
if (this._isSelectRowDefined()) cellIndex--;
261+
if (this._isExpandColumnVisible()) cellIndex--;
262+
onRowClick(this.props.data[rowIndex - 1], rowIndex - 1, cellIndex);
262263
}
263264

264265
handleRowDoubleClick = rowIndex => {

0 commit comments

Comments
 (0)