Skip to content
← Inventory

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 column instance (not a column id) — counts come from column.getFacetedUniqueValues(), so wire getFacetedUniqueValues/getFacetedRowModel into 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

PropTypeDefaultDescription
columnColumn<TData, TValue>

TanStack Table column to filter; supplies facet counts and reads/writes its filter value.

options(required)ColumnFilterOption[]

Selectable values shown in the filter list.

titlestring

Label for the trigger button and the search input placeholder.

Also exports

  • interfaceDataGridColumnFilterProps

Composition