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-selector
Loading 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

PropTypeDefaultDescription
listAsComponentType<FieldsSelectorListProps>—Replaces the `ul` around the rows.
resourcestring—The resource, used to label columns. Defaults to the resource context.
rowAsComponentType<FieldsSelectorRowProps>—Replaces the `li` around each row.
storeKeystring—The store key the table uses.