FieldsSelector
The list of columns inside <ColumnsButton>: a switch, a label and Move up / Move down buttons per column, with a search box once there are more than five columns. listAs and rowAs replace the list around the rows and each row, so a drag add-on can wrap them without this component importing a drag package.
Installation
pnpm dlx shadcn@latest add @chelone/fields-selectorLoading preview…
The list of columns inside <ColumnsButton>: a switch, a label and Move up / Move down buttons per column, with a search box once there are more than five columns. listAs and rowAs replace the list around the rows and each row, so a drag add-on can wrap them without this component importing a drag package.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| listAs | ComponentType<FieldsSelectorListProps> | — | Replaces the `ul` around the rows. |
| resource | string | — | The resource, used to label columns. Defaults to the resource context. |
| rowAs | ComponentType<FieldsSelectorRowProps> | — | Replaces the `li` around each row. |
| storeKey | string | — | The store key the table uses. |