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_setColumnOrder

Function: table_setColumnOrder()

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

Defined in: features/column-ordering/columnOrderingFeature.utils.ts:104

Routes a column order updater through the table's column-order change handler.

The updater may be a next ordered id array or a function of the previous array, matching the instance table.setColumnOrder behavior.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

updater

Updater<ColumnOrderState>

Returns

void

Example

ts
table_setColumnOrder(table, ['firstName', 'lastName', 'age'])
table_setColumnOrder(table, ['firstName', 'lastName', 'age'])