DataTableColumnsMenu
DataTableColumnsMenu<
TFieldSlug>(props):ReactNode
Defined in: packages/react/src/ui/data-table/DataTableColumnsMenu.tsx:151
A dropdown of checkboxes toggling which enableHiding columns are
visible in the list table, a 3-state pin control (left/none/right,
Decision 48) per column, plus a Density toggle (Decision 29).
Column visibility, pin, AND density are all purely controlled — Decision 42
puts density in a cookie read on the server
(parseListViewConfigCookies) and owned by CollectionListView, the same
split live preview’s panel-open state already uses
(readLivePreviewPanelCookie/writeLivePreviewPanelCookie) — a
component-local store can’t be read before hydration, so the density the
server rendered and the density the client mounts with could otherwise
differ for one frame.
placement="inline" (default) renders through DataTableResponsiveMenu
(a Popover at useIsMobile() === false, a bottom Sheet below 768px) —
its own “Columns” label hides itself below @xl/list (Decision 43) via a
plain CSS class on its own <span>; placement="menu" renders the
identical checkbox/pin/density body as a labeled section for ListViewToolbar’s
⋯ overflow — both forms share the exact same body JSX.
Type Parameters
Section titled “Type Parameters”TFieldSlug
Section titled “TFieldSlug”TFieldSlug extends string = string
Parameters
Section titled “Parameters”DataTableColumnsMenuProps<TFieldSlug>
Component props. See DataTableColumnsMenuProps.
Returns
Section titled “Returns”ReactNode
The columns control, or null when columnMenuEntries is empty.