Skip to content

GridFilterOperator API

Extended documentation for the GridFilterOperator interface with detailed information on the module's properties and available APIs.

Demos

Import

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


Filter operator definition interface.

Properties

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>


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

Type:GridFilterItem['operator']


Optional

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

Type:(value: any) => string


Optional

The label of the filter shown in header filter row.

Type:string


Optional

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

Type:(props: I) => Iterable<ReactNode> | Promise<AwaitedReactNode> | Promise<ReactNode> | ReactElement<unknown, string | JSXElementConstructor<any>> | ReactPortal | bigint | boolean | number | string | new (props: I, context: any) => Component<any, any, any>


Optional

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

Type:Partial<I>


Optional

The label of the filter operator.

Type:string


Optional

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