onCellClick

This commit is contained in:
ryan 2019-03-11 08:17:59 -07:00
parent 7054cf8bb5
commit c84c77e664

View File

@ -165,7 +165,7 @@ export class Table extends Component<Props, State> {
} }
}; };
handleCellClick = (rowIndex: number, columnIndex: number) => { onCellClick = (rowIndex: number, columnIndex: number) => {
const { row, column } = this.getCellRef(rowIndex, columnIndex); const { row, column } = this.getCellRef(rowIndex, columnIndex);
if (row < 0) { if (row < 0) {
this.doSort(column); this.doSort(column);
@ -190,7 +190,7 @@ export class Table extends Component<Props, State> {
} }
return ( return (
<div className="gf-table-header" style={style} onClick={() => this.handleCellClick(rowIndex, columnIndex)}> <div className="gf-table-header" style={style} onClick={() => this.onCellClick(rowIndex, columnIndex)}>
{col.text} {col.text}
{sorting && <SortIndicator sortDirection={sortDirection} />} {sorting && <SortIndicator sortDirection={sortDirection} />}
</div> </div>