1771 Technologies Logo

Grid API

FilterApi<T>

API functions for interacting with grid filters.

Type parameters

Type parameter
T

Properties

  • Name
    clearFilters
    Type
    () => void
    Description

    Removes all filters applied to the grid.

  • Name
    evaluateFilterExpressionExn
    Type
    (expr: FilterExpr, data: T) => boolean
    Description

    Evaluates a given filter expression against the grid's state. Returns false for invalid filter expressions. Use isFilterExpressionValid to check if an expression is valid.

  • Name
    getFilterExpressionValidationProblems
    Type
    (expr: FilterExpr) => string[]
    Description

    Determines the issues present in a given FilterExpr. Useful for debugging and understanding problems in a filter expression.

    Remarks

    The returned strings may not be suitable for display to non-technical users.

  • Name
    getFilterModel
    Type
    () => FilterExpr[]
    Description

    Returns the current filter model applied to the grid. If no filters are applied, returns an empty array.

  • Name
    isFilterExpressionValid
    Type
    (expr: FilterExpr) => boolean
    Description

    Checks if the given expression is a valid filter expression. For ExprColumn values, verifies the columnId against the grid's column definitions.

  • Name
    setFilterModelExn
    Type
    (newModel: FilterExpr[]) => void
    Description

    Applies a new filter model to the grid. Filters out any invalid filter expressions before applying. Use isFilterExpressionValid to check if a filter is valid.