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-buttonA 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
| Prop | Type | Default | Description |
|---|---|---|---|
| asChild | boolean | — | |
| resource | string | — | The resource whose table to control. Defaults to the resource context. |
| size | "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | — | |
| storeKey | string | — | The store key the table uses. Defaults to the resource's own key. |
| variant | "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | — |