Skip to content

FilteringMethods

Filtering methods returned from useGridFiltering.

PropertyTypeDescription
setFilter(field: string, filter: Omit<FilterModel, field> | unknown, options: object) => voidSet a filter on a specific field.
getFilter(field: string) => FilterModel | undefinedGet the current filter for a field.
getFilters() => FilterModel[]Get all active filters.
setFilterModel(filters: FilterModel[], options: object) => voidSet all filters at once (replaces existing).
clearAllFilters(options: object) => voidClear all active filters.
clearFieldFilter(field: string, options: object) => voidClear filter for a specific field.
isFieldFiltered(field: string) => booleanCheck if a field has an active filter.
getFilteredRowCount() => numberGet 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) => BlankModeGet the current blank mode for a field.
toggleBlankFilter(field: string, mode: BlankMode) => voidToggle 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