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

table_setExpanded

Function: table_setExpanded()

ts
function table_setExpanded<TFeatures, TData>(table, updater): void;
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 }))
table_setExpanded(table, (old) => ({ ...old, [rowId]: true }))