Skip to content
LoidoltTheme 0.11.1
Svelte 5

Component

DataTableFacetedFilter

A menu of checkboxes that filters a column to the chosen values, with counts.

import { DataTableFacetedFilter } from '@loidolt/theme-svelte';

Example

Cut sheets
StockStatusLayers
Bracket 1Birch plyReady1
Coaster 1Mount boardIn review8
Sign 1CorkReady4
Enclosure 1AcrylicBlocked11
Panel 1Birch plyReady7

1–5 of 42

Notes

  • Counts come from rows passing every other filter, so each choice shows what picking it would add.
  • Choices default to the column's filterOptions, else the distinct values in the data.

Props

Generated from the component source, so it cannot drift from the implementation.

DataTableFacetedFilter props
PropTypeDefaultNotes
column required string—The column to filter.
table required DataTableState<T>—
class string—
clearLabel string'Clear filter'
options Option[]—Choices. Defaults to the column's filterOptions, else the values present in the data.
selectedText (count: number) => string(count) => `${count} selected`How the trigger reports a selection, e.g. "Stock, 2 selected".
showCounts booleantrueShow how many rows hold each value.
title string—Trigger text and menu heading. Defaults to the column header.