GridFilterForm API
Demos
For examples and details on the usage of this React component, visit the component demo pages:
Import
import GridFilterForm from '/packages/grid/x-data-grid/src/components/panel/filterPanel/GridFilterForm.tsx/GridFilterForm';
// or
import { GridFilterForm } from '/packages/grid/x-data-grid/src/components/panel/filterPanel/GridFilterForm.tsx';Props
Callback called when the operator, column field or value is changed.
Type:
funcSignature:
function(item: GridFilterItem) => voiditemThe updated GridFilterItem.
Callback called when the logic operator is changed.
Type:
funcSignature:
function(operator: GridLogicOperator) => voidoperatorThe new logic operator.
Callback called when the delete button is clicked.
Type:
funcSignature:
function(item: GridFilterItem) => voiditemThe deleted GridFilterItem.
If true, the logic operator field is rendered. The field will be invisible if showMultiFilterOperators is also true.
Type:
boolThe GridFilterItem representing this form.
Type:
{ field: string, id?: number | string, operator: string, value?: any }Changes how the options in the columns selector should be ordered. If not specified, the order is derived from the columns prop.
Type:
'asc' | 'desc'Allows to filter the columns displayed in the filter form.
Type:
funcSignature:
function(args: FilterColumnsArgs) => voidargsThe columns of the grid and name of field.
Sets the available logic operators.
Type:
Array<'and' | 'or'>Default:
[GridLogicOperator.And, GridLogicOperator.Or]The
ref is forwarded to the root element.