跳到主要內容

GridFilterPanelAPI

React GridFilterPanel 元件的 API 參考文件。瞭解此匯出模組的 props、CSS 和其他 API。

示範

Import

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';

閱讀這份關於最小化套件大小的指南,以瞭解差異。

Props

變更欄位選擇器中選項的排序方式。若未指定,排序方式會從 columns prop 衍生而來。

類型:'asc'
| 'desc'


若為 true,則不會顯示 新增篩選條件 按鈕。

類型:bool

預設值:false


若為 true,則 移除全部 按鈕將會停用

類型:bool

預設值:false


傳遞至每個篩選條件表單的 Props。

類型:{ 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]


系統 prop,允許定義系統覆寫以及額外的 CSS 樣式。

請參閱 `sx` 頁面 以瞭解更多詳細資訊。

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


ref 會轉發到根元素。

原始碼

如果您在此頁面中找不到資訊,請考慮查看元件的實作以取得更多詳細資訊。