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.23
Max: 1988.23
1
Oriental Silk Bacon
Home & Garden
351.72
2
Gorgeous Gold Fish
Home & Garden
70
3
Ergonomic Plastic Cheese
Sports
25.47
4
Oriental Bronze Shirt
Electronics
659.57
5
Fresh Ceramic Sausages
Electronics
1430.55
6
Soft Steel Mouse
Sports
221.6
7
Ergonomic Steel Mouse
Sports
299.3
8
Modern Ceramic Table
Home & Garden
274.36
9
Sleek Concrete Car
Clothing
124.56
10
Refined Plastic Towels
Electronics
1695.04
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