interface GridColumnsManagementProps {
    autoFocusSearchField?: boolean;
    disableResetButton?: boolean;
    disableShowHideToggle?: boolean;
    getTogglableColumns?: ((columns: GridColDef[]) => string[]);
    searchInputProps?: Partial<TextFieldProps>;
    searchPredicate?: ((column: GridColDef, searchValue: string) => boolean);
    sort?: "desc" | "asc";
    toggleAllMode?: "all" | "filteredOnly";
}

Properties

autoFocusSearchField?: boolean

If true, the column search field will be focused automatically. If false, the first column switch input will be focused automatically. This helps to avoid input keyboard panel to popup automatically on touch devices.

true
disableResetButton?: boolean

If true, the Reset button will not be disabled

false
disableShowHideToggle?: boolean

If true, the Show/Hide all toggle checkbox will not be displayed.

false
getTogglableColumns?: ((columns: GridColDef[]) => string[])

Returns the list of togglable columns. If used, only those columns will be displayed in the panel which are passed as the return value of the function.

Type declaration

    • (columns): string[]
    • Parameters

      • columns: GridColDef[]

        The ColDef list of all columns.

      Returns string[]

      The list of togglable columns' field names.

searchInputProps?: Partial<TextFieldProps>
searchPredicate?: ((column: GridColDef, searchValue: string) => boolean)
sort?: "desc" | "asc"
toggleAllMode?: "all" | "filteredOnly"

Changes the behavior of the Show/Hide All toggle when the search field is used:

  • all: Will toggle all columns.
  • filteredOnly: Will only toggle columns that match the search criteria.
'all'