FilterListItem
A one-click filter for the list aside. It merges its value into the list filter, and removes it again when selected a second time.
Installation
pnpm dlx shadcn@latest add @chelone/filter-list-itemA one-click filter for the list aside. It merges its value into the list filter, and removes it again when selected a second time.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| icon | ReactNode | — | |
| isSelected | (value: FilterPayload, filters: FilterPayload) => boolean | — | Replaces `isFilterSelected`. |
| label | ReactNode | — | A string is translated with itself as the fallback; an element renders as it is. |
| toggleFilter | (value: FilterPayload, filters: FilterPayload) => FilterPayload | — | Replaces `toggleFilterValue`; returns the filters to set. |
| value | FilterPayload | — | The filter this item sets, and removes again once the list holds it. |