Genesis
@stable

DataFilters

packages/ui/src/components/data/DataFilters.tsx

Import
Subpath export: @marktiderman/genesis-ui/data
import { DataFilters } from "@marktiderman/genesis-ui/data";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

DataFilters

PropTypeDefaultDescription
onSearchChange*(value: string) => void—
onSortChange*(sort: string) => void—
search*string—
sort*string—
sortOptions*{ value: string; label: string; nulls?: "first" | "last" | undefined; }[]—`value` is `field:asc` or `field:desc`. `nulls` says where rows with no value go on that sort (server-driven lists).
canSaveViewsbooleanfalse
extraReactNode—Controls after the filter comboboxes in the filter row: a view's range and text filters.
extraActivebooleanfalseThe `extra` controls narrow the list, so "Clear all" shows for them too.
filtersDataFilterConfig[][]
leadingReactNode—A row above the search row: ResourceView's segments (ADR 0017).
onClearAll(() => void)—Called when "Clear all" is clicked
onDeleteView((id: string) => void)—
onError((message: string) => void)—Called when an error occurs
onLoadView((filters: Record<string, unknown>) => void)—
onSaveView((name: string) => void)—
onViewSaved((name: string) => void)—Called after a view is saved successfully
savedViewsSavedViewItem[][]Saved views
searchInputRefRefObject<HTMLInputElement | null>—Expose the search input ref for keyboard nav "/" shortcut
searchPlaceholderstring—
showSearchbooleantrueShow the search box. Default `true`; turn off when the data source can't search.
showSortbooleantrueShow the sort select. Default `true`; turn off when the data source can't sort.
statusChips{ options: (string | StatusChipOption)[]; selected: string[]; onChange: (values: string[]) => void; variant?: StatusChipsVariant; }—Status chip toggles