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

Function: table_setColumnVisibility()

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

Defined in: features/column-visibility/columnVisibilityFeature.utils.ts:261

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

The updater may be a next visibility map or a function of the previous map, matching the instance table.setColumnVisibility behavior.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

updater

Updater<ColumnVisibilityState>

Returns

void

Example

ts
table_setColumnVisibility(table, (old) => ({ ...old, age: false }))
table_setColumnVisibility(table, (old) => ({ ...old, age: false }))