TanStack

table_getToggleAllColumnsVisibilityHandler

ts
function table_getToggleAllColumnsVisibilityHandler<TFeatures, TData>(table): (e) => void;

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

Creates a checkbox-style handler that shows or hides all columns.

The handler reads event.target.checked, so it is intended for controls whose checked state means "all columns visible".

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

Returns

(e) => void

Example

ts
const onChange = table_getToggleAllColumnsVisibilityHandler(table)