table_setExpanded

Function: table_setExpanded()

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

Defined in: features/row-expanding/rowExpandingFeature.utils.ts:62

Routes an expanded-state updater through the table's expanded change handler.

The updater may be true, a row-id map, or a function of the previous expanded state, matching the instance table.setExpanded behavior.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

updater

Updater<ExpandedState>

Returns

void

Example

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