From 7320dd4ee94ebf233fbeb6a96d783b39ae215d84 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Sat, 4 Mar 2017 18:05:56 +0800 Subject: [PATCH] fix #1099 --- src/TableBody.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/TableBody.js b/src/TableBody.js index d6592481f..fb5206918 100644 --- a/src/TableBody.js +++ b/src/TableBody.js @@ -321,13 +321,20 @@ class TableBody extends Component { } handleEditCell = (rowIndex, columnIndex, action, e) => { - if (this._isSelectRowDefined()) { + const defineSelectRow = this._isSelectRowDefined(); + const expandColumnVisible = this._isExpandColumnVisible(); + if (defineSelectRow) { columnIndex--; if (this.props.selectRow.hideSelectColumn) columnIndex++; } + if (expandColumnVisible) { + columnIndex--; + } rowIndex--; if (action === 'tab') { + if (defineSelectRow) columnIndex++; + if (expandColumnVisible) columnIndex++; this.handleCompleteEditCell(e.target.value, rowIndex, columnIndex - 1); if (columnIndex >= this.props.columns.length) { rowIndex = rowIndex + 1;