Skip to content

Commit

Permalink
fix #995
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Jan 31, 2017
1 parent 774cf10 commit 2d8212a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ class TableRow extends Component {
}

rowClick = e => {
const rowIndex = this.props.index + 1;
if (this.props.onRowClick) this.props.onRowClick(rowIndex);
if (e.target.tagName === 'TD') {
const rowIndex = this.props.index + 1;
const cellIndex = e.target.cellIndex;
const { selectRow, unselectableRow, isSelected, onSelectRow, onExpandRow } = this.props;
if (selectRow) {
Expand All @@ -35,7 +36,6 @@ class TableRow extends Component {
} else {
this.expandRow(rowIndex, cellIndex);
}
if (this.props.onRowClick) this.props.onRowClick(rowIndex);
}
}

Expand Down

0 comments on commit 2d8212a

Please sign in to comment.