Docs
Cloudflare
Railway
CodeRabbit
AG Grid
SerpAPI
WorkOS
Clerk
Netlify
OpenRouter
Unkey
Sentry
Electric
Prisma
Cloudflare
Railway
CodeRabbit
AG Grid
SerpAPI
WorkOS
Clerk
Netlify
OpenRouter
Unkey
Sentry
Electric
Prisma
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
Static Functions API Reference

table_setRowSelection

Function: table_setRowSelection()

ts
function table_setRowSelection<TFeatures, TData>(table, updater): void;
function table_setRowSelection<TFeatures, TData>(table, updater): void;

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

Routes a row selection updater through the table's selection change handler.

The updater may be a next selection map or a function of the previous map, matching the instance table.setRowSelection behavior.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

updater

Updater<RowSelectionState>

Returns

void

Example

ts
table_setRowSelection(table, (old) => ({ ...old, [rowId]: true }))
table_setRowSelection(table, (old) => ({ ...old, [rowId]: true }))