ColumnsButton

A button that opens a panel to show, hide and reorder the columns of a <DataTable>. It needs a store on <Admin>, and lists the columns the <DataTable> publishes: each one with a source or a string label.

Installation

pnpm dlx shadcn@latest add @chelone/columns-button

A button that opens a panel to show, hide and reorder the columns of a <DataTable>. It needs a store on <Admin>, and lists the columns the <DataTable> publishes: each one with a source or a string label.

Props

PropTypeDefaultDescription
asChildboolean—
resourcestring—The resource whose table to control. Defaults to the resource context.
size"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null—
storeKeystring—The store key the table uses. Defaults to the resource's own key.
variant"link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null—