Docs
CodeRabbit
Cloudflare
Railway
WorkOS
SerpAPI
Clerk
Netlify
OpenRouter
AG Grid
Unkey
Sentry
Electric
Prisma
CodeRabbit
Cloudflare
Railway
WorkOS
SerpAPI
Clerk
Netlify
OpenRouter
AG Grid
Unkey
Sentry
Electric
Prisma
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_resetColumnOrder

Function: table_resetColumnOrder()

ts
function table_resetColumnOrder<TFeatures, TData>(table, defaultState?): void;
function table_resetColumnOrder<TFeatures, TData>(table, defaultState?): void;

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

Resets columnOrder to the configured initial state or feature default.

With no argument, the reset clones table.initialState.columnOrder when it exists. Passing true ignores initial state and resets to [].

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

defaultState?

boolean

Returns

void

Example

ts
table_resetColumnOrder(table)
table_resetColumnOrder(table, true)
table_resetColumnOrder(table)
table_resetColumnOrder(table, true)