DataTableColumnsMenuProps
Defined in: packages/react/src/ui/data-table/DataTableColumnsMenu.tsx:45
Props for DataTableColumnsMenu.
Type Parameters
Section titled “Type Parameters”TFieldSlug
Section titled “TFieldSlug”TFieldSlug extends string = string
The collection’s field slugs.
Properties
Section titled “Properties”columnMenuEntries
Section titled “columnMenuEntries”columnMenuEntries:
DataTableColumn<TFieldSlug>[]
Defined in: packages/react/src/ui/data-table/DataTableColumnsMenu.tsx:47
Every readable column’s static label/hideable metadata (Decision 47 — widened from “hideable only”), unordered; display order/visibility/pin state comes from columns.
columns
Section titled “columns”columns:
ColumnEntry<TFieldSlug>[]
Defined in: packages/react/src/ui/data-table/DataTableColumnsMenu.tsx:49
The active view’s FULL column list (Decision 48) — every one of the collection’s own data fields, exactly once, in display order, each a ColumnEntry (possibly carrying width/pinned/hidden overrides). Drives the row sequence, checkbox, AND pin-control state here.
density
Section titled “density”density:
ListDensity
Defined in: packages/react/src/ui/data-table/DataTableColumnsMenu.tsx:55
The current density preference — owned by CollectionListView/useListViewContext(), cookie-backed (Decision 42), never this component’s own state.
hasActiveView?
Section titled “hasActiveView?”
optionalhasActiveView?:boolean
Defined in: packages/react/src/ui/data-table/DataTableColumnsMenu.tsx:53
Whether a saved view is currently active — when false, a session-only notice is shown (Decision 15).
onColumnsChange
Section titled “onColumnsChange”onColumnsChange: (
columns) =>void
Defined in: packages/react/src/ui/data-table/DataTableColumnsMenu.tsx:51
Replaces the full columns array after a drag-reorder, checkbox toggle, or pin-control change — the ONE setter for every interaction this menu offers (resizing is NOT controlled from here, only from the header’s own drag handle, Decision 48).
Parameters
Section titled “Parameters”columns
Section titled “columns”ColumnEntry<TFieldSlug>[]
Returns
Section titled “Returns”void
onDensityChange
Section titled “onDensityChange”onDensityChange: (
density) =>void
Defined in: packages/react/src/ui/data-table/DataTableColumnsMenu.tsx:57
Replaces the density preference; the caller both updates its own state and writes it into the consolidated vex-admin cookie (writeListViewDensityCookie, Decision 51) so the next server render matches with no flash.
Parameters
Section titled “Parameters”density
Section titled “density”Returns
Section titled “Returns”void
placement?
Section titled “placement?”
optionalplacement?:ActionPlacement
Defined in: packages/react/src/ui/data-table/DataTableColumnsMenu.tsx:64
Which surface this render is for (mirrors the edit view’s
placement convention): "inline" (default) for the toolbar’s own
DataTableResponsiveMenu trigger, "menu" for a labeled section
folded into ListViewToolbar’s ⋯ overflow menu.