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.96
Max: 1976.65
1
Practical Plastic Soap
Clothing
255.41
2
Intelligent Gold Table
Home & Garden
250.12
3
Modern Rubber Cheese
Sports
236.6
4
Soft Marble Cheese
Home & Garden
443.87
5
Electronic Marble Hat
Beauty
413.91
6
Bespoke Bamboo Car
Electronics
1553.96
7
Refined Bronze Chicken
Sports
66.97
8
Handmade Metal Chips
Sports
219.03
9
Oriental Steel Bike
Clothing
229.53
10
Incredible Granite Shirt
Home & Garden
134.63
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