Skip to content

Commit

Permalink
chore: split filtering api docs 路 3b3b3b3b (#5446)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Mar 27, 2024
1 parent 3952c34 commit ac148c7
Show file tree
Hide file tree
Showing 18 changed files with 961 additions and 691 deletions.
46 changes: 46 additions & 0 deletions docs/api/features/column-faceting.md
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.

0 comments on commit ac148c7

Please sign in to comment.