跳到内容

GridFilterPanelAPI

React GridFilterPanel 组件的 API 参考文档。了解此导出模块的属性、CSS 和其他 API。

演示

导入

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

阅读有关最小化包大小的指南,了解它们之间的区别。

属性

更改列选择器中选项的排序方式。如果未指定,则顺序从 columns 属性派生。

类型:'asc'
| 'desc'


如果为 true,则不会显示“添加筛选器”按钮。

类型:bool

默认值:false


如果为 true,则“移除全部”按钮将被禁用

类型:bool

默认值:false


传递给每个筛选器表单的属性。

类型:{ columnInputProps?: any, columnsSort?: 'asc'
| 'desc', deleteIconProps?: any, filterColumns?: func, logicOperatorInputProps?: any, operatorInputProps?: any, valueInputProps?: any }


返回要选择作为默认筛选器的下一个筛选器项的函数。

类型:func

签名:
function(args: GetColumnForNewFilterArgs) => void
  • args 当前配置的筛选器和列。

设置可用的逻辑运算符。

类型:Array<'and'
| 'or'>

默认值:[GridLogicOperator.And, GridLogicOperator.Or]


系统属性,允许定义系统覆盖以及其他 CSS 样式。

有关更多详细信息,请参阅 [`sx` 页面

类型:Array<func
| object
| bool>
| func
| object


ref 被转发到根元素。

源代码

如果在此页面中找不到信息,请考虑查看组件的实现以获取更多详细信息。