Faceted column filters
Calculate facets to generate dynamic filter values for columns.
Example
Id
Filter mode: Min: 1
Max: 1000
Name
Filter mode:
Category
Price Retail
Filter mode: Min: 10.28
Max: 1995.9
1
Generic Concrete Pizza
Sports
463.16
2
Sleek Granite Computer
Sports
286.58
3
Gorgeous Steel Chicken
Sports
14.94
4
Modern Ceramic Cheese
Clothing
358.83
5
Tasty Concrete Ball
Home & Garden
57.13
6
Practical Cotton Chicken
Clothing
345.04
7
Intelligent Bronze Mouse
Electronics
910.28
8
Soft Cotton Chicken
Beauty
450.26
9
Tasty Wooden Salad
Beauty
214.6
10
Ergonomic Steel Keyboard
Beauty
141.71
Per page:
Page 1 of 100
Showing
1
to
10
of 1000 rows
{#each datagrid.columns.getLeafColumns() as column}
{@render LeafHeader(column)}
{/each}
{#each datagrid.rows.getPaginatedRows() as row}
{#each datagrid.columns.getLeafColumns() as column}
{#if !row.isGroupRow()}
{/each}
{getCellContent(column, row.original)}
{:else}{/if}
{/each}
{column.header}
{#if column.options.filterable}
Key Points
Calculating Facets:
Facets can be calculated per column by setting
options: { calculateFacets: true },
How To Use Facets:
Check
<ColumnFiltersInput />
for example implementation