I want to write some custom logic when the "select all" checkbox is checked in the react-data-grid. So how do i get a handle of that "select all" checkbox when the user clicks on it?
Here is the link to some of the react-data-grid examples http://adazzle.github.io/react-data-grid/#/ and the link to the repo https://github.com/adazzle/react-data-grid
In my render(), i have the react-data-grid defined as shown below.
The table when it is rendered looks like this react data grid demo
let dataGrid = <ReactDataGrid
ref={node => this.grid = node}
onGridSort={this.handleGridSort}
enableCellSelect={true}
columns={this._columns}
rowGetter={this.rowGetter}
rowsCount={this.getSize()}
minWidth={this.state.width}
minHeight={this.state.height}
rowKey="id"
rowHeight={90}
headerRowHeight={35}
rowSelection={{
showCheckbox: true,
enableShiftSelect: true,
onRowsSelected: this.onRowsSelected,
onRowsDeselected: this.onRowsDeselected,
selectBy: {
indexes: this.state.selectedIndexes
}
}
}
emptyRowsView={EmptyRowsView}
>
</ReactDataGrid>;