Cell Clicking

React to cell clicks with onCellClick.

Handle cell clicks

Pass onCellClick. Use accessor, value, and row for navigation, modals, or other actions.

React TSX
const handleCellClick = ({ accessor, value, row, rowIndex, colIndex }) => {
// open a detail view, navigate, filter, etc.
console.log(accessor, value, row.id, rowIndex, colIndex);
};
<SimpleTable
columns={columns}
rows={rows}
onCellClick={handleCellClick}
/>

Example

Click cells to filter, toggle status, or open details. Use Code or StackBlitz for the full example.

Last Click:Click any cell to see interaction details...

Props

Cell Clicking Configuration

PropertyRequiredDescriptionExample
Optional
Fires when a cell is clicked. Receives accessor, value, row, and indices.

Click arguments

CellClickProps

PropertyRequiredDescriptionExample
accessor
Required
The column accessor/key of the clicked cell
colIndex
number
Required
The column index of the clicked cell (0-based)
row
Required
The complete row object containing the clicked cell
rowIndex
number
Required
The row index of the clicked cell (0-based)
Required
The value of the clicked cell