UNPKG

@mui/x-data-grid

Version:

The community edition of the data grid component (MUI X).

34 lines (33 loc) 1.03 kB
import { GridRowId, GridRowTreeNodeConfig } from './gridRows'; export declare type GridSortDirection = 'asc' | 'desc' | null | undefined; export interface GridSortCellParams<V = any> { id: GridRowId; field: string; value: V; rowNode: GridRowTreeNodeConfig; /** * @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`) */ api: any; } /** * The type of the sort comparison function. */ export declare type GridComparatorFn<V = any> = (v1: V, v2: V, cellParams1: GridSortCellParams<V>, cellParams2: GridSortCellParams<V>) => number; /** * Object that represents the column sorted data, part of the [[GridSortModel]]. */ export interface GridSortItem { /** * The column field identifier. */ field: string; /** * The direction of the column that the grid should sort. */ sort: GridSortDirection; } /** * The model used for sorting the grid. */ export declare type GridSortModel = GridSortItem[];