Column Definition interface used for columns with the actions type.

interface GridActionsColDef<R, V, F> {
    align?: GridAlignment;
    cellClassName?: GridCellClassNamePropType<R, V>;
    colSpan?: number | GridColSpanFn<R, V, F>;
    description?: string;
    disableColumnMenu?: boolean;
    disableExport?: boolean;
    disableReorder?: boolean;
    display?: "flex" | "text";
    editable?: boolean;
    field: string;
    filterable?: boolean;
    filterOperators?: readonly GridFilterOperator<R, V, F>[];
    flex?: number;
    getActions: ((params: GridRowParams<R>) => readonly ReactElement<GridActionsCellItemProps, string | JSXElementConstructor<any>>[]);
    getApplyQuickFilterFn?: GetApplyQuickFilterFn<R, V>;
    getSortComparator?: ((sortDirection: GridSortDirection) => undefined | GridComparatorFn<V>);
    groupable?: boolean;
    headerAlign?: GridAlignment;
    headerClassName?: GridColumnHeaderClassNamePropType;
    headerName?: string;
    hideable?: boolean;
    hideSortIcons?: boolean;
    maxWidth?: number;
    minWidth?: number;
    pinnable?: boolean;
    preProcessEditCellProps?: ((params: GridPreProcessEditCellProps<any, any>) => GridEditCellProps<any> | Promise<GridEditCellProps<any>>);
    renderCell?: ((params: GridRenderCellParams<R, V, F, GridTreeNodeWithRender>) => ReactNode);
    renderEditCell?: ((params: GridRenderEditCellParams<R, V, F, GridTreeNodeWithRender>) => ReactNode);
    renderHeader?: ((params: GridColumnHeaderParams<R, V, F>) => ReactNode);
    renderHeaderFilter?: ((params: GridRenderHeaderFilterProps) => ReactNode);
    resizable?: boolean;
    rowSpanValueGetter?: GridValueGetter<R, V, F, never>;
    sortable?: boolean;
    sortComparator?: GridComparatorFn<V>;
    sortingOrder?: readonly GridSortDirection[];
    type: "actions";
    valueFormatter?: GridValueFormatter<R, V, F, never>;
    valueGetter?: GridValueGetter<R, V, F, never>;
    valueParser?: GridValueParser<R, V, F>;
    valueSetter?: GridValueSetter<R, V, F>;
    width?: number;
}

Type Parameters

Hierarchy

  • GridBaseColDef<R, V, F>
    • GridActionsColDef

Properties

Align cell content.

cellClassName?: GridCellClassNamePropType<R, V>

Class name added to cells in this column.

colSpan?: number | GridColSpanFn<R, V, F>

Number of columns a cell should span.

1
description?: string

The tooltip text shown when the column header name is truncated.

disableColumnMenu?: boolean

If true, the column menu is disabled for this column.

false
disableExport?: boolean

If true, this column will not be included in exports.

false
disableReorder?: boolean

If true, this column cannot be reordered.

false
display?: "flex" | "text"

Display mode for the cell:

  • 'text': For text-based cells (default)
  • 'flex': For cells with HTMLElement children
editable?: boolean

If true, the cells of the column are editable.

false
field: string

The unique identifier of the column. Used to map with [[GridRowModel]] values.

filterable?: boolean

If true, the column is filterable.

true
filterOperators?: readonly GridFilterOperator<R, V, F>[]

Allows setting the filter operators for this column.

flex?: number

The flex grow factor of the column. Must be a positive number.

getActions: ((params: GridRowParams<R>) => readonly ReactElement<GridActionsCellItemProps, string | JSXElementConstructor<any>>[])

Function that returns the actions to be shown.

Type declaration

getApplyQuickFilterFn?: GetApplyQuickFilterFn<R, V>

The callback that generates a filtering function for a given quick filter value. This function can return null to skip filtering for this value and column.

The value with which we want to filter the column.

The column from which we want to filter the rows.

Deprecated: The API of the grid.

The function to call to check if a row pass this filter value or not.

getSortComparator?: ((sortDirection: GridSortDirection) => undefined | GridComparatorFn<V>)

Provide an alternative comparator function for sorting. Takes precedence over sortComparator.

Type declaration

groupable?: boolean

If true, the rows can be grouped based on this column values (pro-plan only). Only available in DataGridPremium. TODO: Use module augmentation to move it to @mui/x-data-grid-premium (need to modify how we handle column types default values).

true
headerAlign?: GridAlignment

Align column header content.

Class name added to the column header cell.

headerName?: string

The title displayed in the column header cell.

hideable?: boolean

If false, removes the option to hide this column.

true
hideSortIcons?: boolean

Toggle the visibility of the sort icons.

false
maxWidth?: number

The maximum width of the column in pixels.

Infinity
minWidth?: number

The minimum width of the column in pixels.

50
pinnable?: boolean

If false, the menu items for column pinning menu will not be rendered. Only available in DataGridPro. TODO: Use module augmentation to move it to @mui/x-data-grid-pro (need to modify how we handle column types default values).

true
preProcessEditCellProps?: ((params: GridPreProcessEditCellProps<any, any>) => GridEditCellProps<any> | Promise<GridEditCellProps<any>>)

Callback fired when the edit props of the cell changes. Processes the props before being saved into the state.

Type declaration

renderCell?: ((params: GridRenderCellParams<R, V, F, GridTreeNodeWithRender>) => ReactNode)

Override the component rendered as cell for this column.

Type declaration

renderEditCell?: ((params: GridRenderEditCellParams<R, V, F, GridTreeNodeWithRender>) => ReactNode)

Override the component rendered in edit cell mode for this column.

Type declaration

renderHeader?: ((params: GridColumnHeaderParams<R, V, F>) => ReactNode)

Override the component rendered in the column header cell.

Type declaration

    • (params): ReactNode
    • Parameters

      Returns ReactNode

      The element to be rendered.

renderHeaderFilter?: ((params: GridRenderHeaderFilterProps) => ReactNode)

Allows to render a component in the column header filter cell.

Type declaration

    • (params): ReactNode
    • Parameters

      Returns ReactNode

      The element to be rendered.

resizable?: boolean

If false, disables resizing for this column.

true
rowSpanValueGetter?: GridValueGetter<R, V, F, never>

Function that returns a specific value to be used in row spanning.

sortable?: boolean

If false, disables sorting for this column.

true
sortComparator?: GridComparatorFn<V>

A comparator function used to sort rows.

sortingOrder?: readonly GridSortDirection[]

The order of the sorting sequence.

type

The type of the column.

'actions'
valueFormatter?: GridValueFormatter<R, V, F, never>

Formats the cell value before rendering.

valueGetter?: GridValueGetter<R, V, F, never>

Function that returns specific data to render in the cell instead of using the field value.

valueParser?: GridValueParser<R, V, F>

Function that takes the user-entered value and converts it to a value used internally.

The converted value to use internally.

valueSetter?: GridValueSetter<R, V, F>

Function that customizes how the entered value is stored in the row. Only works with cell/row editing.

The row with the updated field.

width?: number

The width of the column in pixels.

100