DataGridColumnFilter
Faceted multi-select filter for a DataGrid column. The trigger summarises the selection; the popover lists options with live facet counts and a clear action.
Usage
import { DataGridColumnFilter, DataGridColumnFilterProps } from "@desk/ui/components/data-grid-column-filter";Best practices
Pass the TanStack
columninstance (not a column id) — counts come fromcolumn.getFacetedUniqueValues(), so wiregetFacetedUniqueValues/getFacetedRowModelinto the table for live facet counts.Supply
options(label/value/icon) explicitly; the filter renders those choices, it does not derive them from the data — omitted values simply won't be filterable.Use this for a discrete multi-select facet; it stores an array filter value, so pair it with a column filter fn that matches array membership.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| column | Column<TData, TValue> | TanStack Table column to filter; supplies facet counts and reads/writes its filter value. | |
| options | ColumnFilterOption[] | Selectable values shown in the filter list. | |
| title | string | Label for the trigger button and the search input placeholder. |
Also exports
- interface
DataGridColumnFilterProps