Skip to content

Commit

Permalink
fix #1099
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Mar 4, 2017
1 parent f5d3789 commit 7320dd4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7320dd4

Please sign in to comment.