Skip to content

Commit

Permalink
fix #1150
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Apr 2, 2017
1 parent 869bf07 commit e8c25fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,19 +326,20 @@ class TableBody extends Component {
}

handleEditCell = (rowIndex, columnIndex, action, e) => {
const { selectRow } = this.props;
const defineSelectRow = this._isSelectRowDefined();
const expandColumnVisible = this._isExpandColumnVisible();
if (defineSelectRow) {
columnIndex--;
if (this.props.selectRow.hideSelectColumn) columnIndex++;
if (selectRow.hideSelectColumn) columnIndex++;
}
if (expandColumnVisible) {
columnIndex--;
}
rowIndex--;

if (action === 'tab') {
if (defineSelectRow) columnIndex++;
if (defineSelectRow && !selectRow.hideSelectColumn) columnIndex++;
if (expandColumnVisible) columnIndex++;
this.handleCompleteEditCell(e.target.value, rowIndex, columnIndex - 1);
if (columnIndex >= this.props.columns.length) {
Expand Down

0 comments on commit e8c25fd

Please sign in to comment.