Skip to content

GridFilterOperator API

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

getApplyFilterFn

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.

Type:GetApplyFilterFn<R, V, F>


value

The name of the filter operator.
It will be matched with the operator property of the filter items.

Type:string


getValueAsStringOptional

Converts the value of a filter item to a human-readable form.

Type:(value: GridFilterItem['value']) => string


headerLabelOptional

The label of the filter shown in header filter row.

Type:string


InputComponentOptional

The input component to render in the filter panel for this filter operator.

Type:React.JSXElementConstructor<any>


InputComponentPropsOptional

The props to pass to the input component in the filter panel for this filter operator.

Type:Record<string, any>


labelOptional

The label of the filter operator.

Type:string


requiresFilterValueOptional

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)

Type:boolean

Default:true