API and Development
Filters from @prepared911/ui/blocks/filters is the search and applied-filter bar. One FiltersValue holds search, an optional segment, and appliedFilters. The block does not filter rows. The page reads the value and narrows its own data.
useFilterState stores that value for a caller that is not already holding it.
| Return | Meaning |
|---|---|
value | { search, segment?, appliedFilters }. |
search | value.search. |
appliedFilters | value.appliedFilters. |
onValueChange | Pass to Filters. Stores the next value unless the details are canceled. |
clearFilters | Clears search and applied filters. The segment stays. |
isControlled | True when value was passed on the first render. |
useFilteredData is not an export. Match rows in the page.
Filters takes menuContentProps as data-* attributes only. They are stamped on the Filters menu, each quick filter menu, and a range panel, which is how a host marks those surfaces as part of the annotation layer. A submenu lives inside the Filters menu. A menu rendered in trailing is marked by the caller.
Sorting a table is DataTable's enableSorting and onSortingChange, not a filter hook.