Skip to content
+

GridFilterOperator Interface

Filter operator definition interface.

Demos

Import

import { GridFilterOperator } from '@mui/x-data-grid-premium';
// or
import { GridFilterOperator } from '@mui/x-data-grid-pro';
// or
import { GridFilterOperator } from '@mui/x-data-grid';

Properties

Name Type Default Description
getApplyFilterFn GetApplyFilterFnLegacy<R, V, F> The callback that generates a filtering function for a given filter item and column.
This function can return null to skip filtering for this item and column.
getApplyFilterFnV7? GetApplyFilterFnV7<R, V, F> The callback that generates a filtering function for a given filter item and column.
This function can return null to skip filtering for this item and column.
This function uses the more performant v7 API.
getValueAsString? (value: GridFilterItem['value']) => string Converts the value of a filter item to a human-readable form.
headerLabel? string The label of the filter shown in header filter row.
InputComponent? React.JSXElementConstructor<any> The input component to render in the filter panel for this filter operator.
InputComponentProps? Record<string, any> The props to pass to the input component in the filter panel for this filter operator.
label? string The label of the filter operator.
requiresFilterValue? boolean true If false, filter operator doesn't require user-entered value to work.
Usually should be set to false for filter operators that don't have InputComponent (for example isEmpty)
value string The name of the filter operator.
It will be matched with the operator property of the filter items.