-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: split filtering api docs · 3b3b3b3b
- Loading branch information
1 parent
3952c34
commit 65a7363
Showing
18 changed files
with
961 additions
and
691 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: Column Faceting APIs | ||
id: column-faceting | ||
--- | ||
|
||
## Column API | ||
|
||
### `getFacetedRowModel` | ||
|
||
```tsx | ||
type getFacetedRowModel = () => RowModel<TData> | ||
``` | ||
> ⚠️ Requires that you pass a valid `getFacetedRowModel` function to `options.facetedRowModel`. A default implementation is provided via the exported `getFacetedRowModel` function. | ||
Returns the row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts. | ||
### `getFacetedUniqueValues` | ||
```tsx | ||
getFacetedUniqueValues: () => Map<any, number> | ||
``` | ||
> ⚠️ Requires that you pass a valid `getFacetedUniqueValues` function to `options.getFacetedUniqueValues`. A default implementation is provided via the exported `getFacetedUniqueValues` function. | ||
A function that **computes and returns** a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. | ||
### `getFacetedMinMaxValues` | ||
```tsx | ||
getFacetedMinMaxValues: () => Map<any, number> | ||
``` | ||
> ⚠️ Requires that you pass a valid `getFacetedMinMaxValues` function to `options.getFacetedMinMaxValues`. A default implementation is provided via the exported `getFacetedMinMaxValues` function. | ||
A function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. | ||
## Table Options | ||
### `getColumnFacetedRowModel` | ||
```tsx | ||
getColumnFacetedRowModel: (columnId: string) => RowModel<TData> | ||
``` | ||
Returns the faceted row model for a given columnId. |
Oops, something went wrong.