FilterBar
Edits the accepted serializable filter AST through removable condition chips and typed draft popovers.@gemologic/sheen-table · dataPlayground
This example has no scalar controls. Its validated source remains interactive below.
<FilterBar columns={columns} value={filter()} onChange={setFilter} facets={{ status: { open: 12, closed: 4 } }} />Variant matrix
Accepted enum filter
Anatomy
- Package
@gemologic/sheen-table- Source
packages/table/src/FilterBar.tsx- Tokens
--sheen-color-bg-raised--sheen-color-border-control--sheen-color-focus-ring
Accessibility
Role: group, dialog, searchbox, button, checkboxKeyboard: Tab, Shift+Tab, Enter, Space, EscapeDo
- Keep the accepted AST controlled by the same owner as table state.
- Use enum facets from the complete transformed result, not the visible page.
- Apply editor drafts atomically and retain accepted rows during delegated revalidation.
Do not
- Do not flatten imported nested logic into a misleading conjunction.
- Do not dispatch server requests on each draft keystroke.
- Do not interpret native date values in the browser's local time zone.
Generated props
| Name | Type | Default | Description |
|---|---|---|---|
columns * | SheenColumns<Row> | — | Opaque sheen columns whose filter declarations supply labels, types, enum options, and validation. |
value * | FilterNode | — | Accepted immutable filter AST. Nested and/or/not structure is preserved during leaf edits. |
onChange * | (filter: FilterNode) => void | — | Receives one validated immutable AST when a draft is applied or a chip is removed. |
facets | Readonly<Record<string, Readonly<Record<string, number>>>> | undefined | — | Optional accepted enum counts by column and option, typically from the complete client view or server response. |
disabled | boolean | false | Prevents apply, add, and remove intent while retaining visible accepted chips and draft inspection. |
class | string | — | Additional class merged onto the labeled filter region. |
dateEditor | FilterDateEditor | — | Optional isolated date selector adapter; omission preserves the native date-input fallback and table bundle boundary. |