FilteringMethods
Filtering methods returned from useGridFiltering.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
setFilter | (field: string, filter: Omit<FilterModel, field> | unknown, options: object) => void | Set a filter on a specific field. |
getFilter | (field: string) => FilterModel | undefined | Get the current filter for a field. |
getFilters | () => FilterModel[] | Get all active filters. |
setFilterModel | (filters: FilterModel[], options: object) => void | Set all filters at once (replaces existing). |
clearAllFilters | (options: object) => void | Clear all active filters. |
clearFieldFilter | (field: string, options: object) => void | Clear filter for a specific field. |
isFieldFiltered | (field: string) => boolean | Check if a field has an active filter. |
getFilteredRowCount | () => number | Get the count of rows after filtering. |
getUniqueValues | (field: string) => unknown[] | Get unique values for a field (for building filter dropdowns). |
getStaleFilters | () => FilterModel[] | Get set filters whose values no longer match any rows in the current data. |
getBlankMode | (field: string) => BlankMode | Get the current blank mode for a field. |
toggleBlankFilter | (field: string, mode: BlankMode) => void | Toggle blank filter mode for a field. |
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt