Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
Table API Reference
Column API Reference
Row API Reference
Cell API Reference
Header API Reference
Features API Reference
Static Functions API Reference
Legacy API Reference

row_getToggleSelectedHandler

ts
function row_getToggleSelectedHandler<TFeatures, TData>(row, opts?): (e) => void;
function row_getToggleSelectedHandler<TFeatures, TData>(row, opts?): (e) => void;

Defined in: features/row-selection/rowSelectionFeature.utils.ts:697

Creates a checkbox-style handler that selects or deselects this row.

The handler is a no-op when the row cannot be selected and reads event.target.checked. Shift events select or deselect the inclusive range from the most recent selectable row handled by this table. Pass selectChildren: false to limit changes to rows explicitly present in the display-order interval, and deselectParents: true to remove ancestor row ids from the selection when rows are deselected.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

row

Row<TFeatures, TData>

opts?

ToggleSelectedOptions

Returns

(e) => void

Example

ts
const onChange = row_getToggleSelectedHandler(row)
const onChange = row_getToggleSelectedHandler(row)