useTableColumnSettings@astryxdesign/core v0.5.2 · useTableColumnSettings

Usage

Headless column visibility and ordering management for Table. Provides filtered columns, toggle helpers, and pre-built MultiSelector options for a column picker UI.

ts
import {useTableColumnSettings} from '@astryxdesign/core/Table'

Parameters

ParamTypeDescription
columnsrequired
[]

All available columns with metadata for the settings UI. Each entry has key, label, optional isAlwaysVisible and group.

activeColumnKeysrequired
string[]

Currently active column keys, in display order. Only columns with keys in this array are shown.

onChangeActiveColumnKeysrequired
(keys: string[]) => void

Called when active columns change (toggle, reorder).

defaultColumnKeys
string[]

Default column set for "Reset to default". When omitted, reset shows all columns.

Examples

Common configurations, variations, and states.
Table — Column Settings
Open in Playground

Table with a column visibility picker in the toolbar. Toggle columns on and off.