Skip to content

FilteringMethods

Filtering methods returned from injectGridFiltering.

Uses lazy discovery - the grid is found on first method call, not during initialization.

PropertyTypeDescription
setFilter(field: string, filter: Omit<FilterModel, field> | unknown, options: { silent?: boolean }) => 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: { silent?: boolean }) => voidSet all filters at once (replaces existing).
clearAllFilters(options: { silent?: boolean }) => voidClear all active filters.
clearFieldFilter(field: string, options: { silent?: boolean }) => 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.
isReadySignal<boolean>Signal indicating if grid is ready.