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_setGrouping

Function: table_setGrouping()

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

Defined in: features/column-grouping/columnGroupingFeature.utils.ts:211

Routes a grouping updater through the table's grouping change handler.

The updater may be a next GroupingState array or a function of the previous grouping state, matching the instance table.setGrouping behavior.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

updater

Updater<GroupingState>

Returns

void

Example

ts
table_setGrouping(table, (old) => [...old, 'status'])
table_setGrouping(table, (old) => [...old, 'status'])