Column Selection

Let users select columns by clicking headers — useful for analysis tools or column-scoped actions.

Enable column selection

Set selectableColumns and handle onColumnSelect. Click a header to select that column (highlights the column).

React TSX
<SimpleTable
selectableColumns
columns={columns}
rows={rows}
onColumnSelect={(column) => {
// column.accessor, column.label, ...
}}
/>

Example

Props

Column Selection Configuration

PropertyRequiredDescriptionExample
selectableColumns
boolean
Optional
Enables clicking column headers to select them.
onColumnSelect
(header: ColumnDef) => void
Optional
Fires when a column header is selected. Receives the framework column def (e.g. ReactColumnDef).