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_toggleSelected

ts
function row_toggleSelected<TFeatures, TData>(
   row,
   value?,
   opts?): void;
function row_toggleSelected<TFeatures, TData>(
   row,
   value?,
   opts?): void;

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

Selects or deselects this row.

Omitting value toggles the row. Child rows are selected recursively unless opts.selectChildren is false, sub-row selection is disabled, or the row only supports single selection. Pass deselectParents: true to also remove ancestor row ids from the selection when this row is deselected.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

row

Row<TFeatures, TData>

value?

boolean

opts?

ToggleSelectedOptions

Returns

void

Example

ts
row_toggleSelected(row)
row_toggleSelected(row, true)
row_toggleSelected(row, false)
row_toggleSelected(row, true, { selectChildren: false })
row_toggleSelected(row, false, { deselectParents: true })
row_toggleSelected(row)
row_toggleSelected(row, true)
row_toggleSelected(row, false)
row_toggleSelected(row, true, { selectChildren: false })
row_toggleSelected(row, false, { deselectParents: true })