table_setRowSelection

Function: table_setRowSelection()

ts
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`](../../index/type-aliases/RowSelectionState.md)\>

Returns

void

Example

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