Skip to content

GridFilterOperator Interface

Filter operator definition interface.

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 (filterItem: GridFilterItem, column: GridColDef<R, V, F>) => null | ((params: GridCellParams<R, V, F>) => boolean) 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.
InputComponent? React.JSXElementConstructor<GridFilterInputValueProps> | React.JSXElementConstructor<GridFilterInputMultipleValueProps> | React.JSXElementConstructor<GridFilterInputMultipleSingleSelectProps> 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.