Files
Vlad Durnea cffdf8af86
Some checks failed
CI/CD Pipeline / unit-tests (push) Failing after 1m16s
CI/CD Pipeline / integration-tests (push) Failing after 2m32s
CI/CD Pipeline / lint (push) Successful in 5m22s
CI/CD Pipeline / e2e-tests (push) Has been skipped
CI/CD Pipeline / build (push) Has been skipped
wip:milestone 0 fixes
2026-03-15 12:35:42 +02:00

43 lines
1.6 KiB
TypeScript

/// <reference types="react" />
import { GridColDef } from './colDef';
import type { GridColumnGroupHeaderParams } from './params/gridColumnGroupHeaderParams';
export interface GridLeafColumn {
field: GridColDef['field'];
}
export type GridColumnNode = GridColumnGroup | GridLeafColumn;
export declare function isLeaf(node: GridColumnNode): node is GridLeafColumn;
/**
* A function used to process headerClassName params.
*/
export type GridColumnGroupHeaderClassFn = (params: GridColumnGroupHeaderParams) => string;
/**
* The union type representing the [[GridColDef]] column header class type.
*/
export type GridColumnGroupHeaderClassNamePropType = string | GridColumnGroupHeaderClassFn;
export interface GridColumnGroup extends Pick<GridColDef, 'headerName' | 'description' | 'headerAlign'> {
/**
* A unique string identifying the group.
*/
groupId: string;
/**
* The groups and columns included in this group.
*/
children: GridColumnNode[];
/**
* If `true`, allows reordering columns outside of the group.
* @default false
*/
freeReordering?: boolean;
/**
* Allows to render a component in the column group header cell.
* @param {GridColumnGroupHeaderParams} params Object containing parameters for the renderer.
* @returns {React.ReactNode} The element to be rendered.
*/
renderHeaderGroup?: (params: GridColumnGroupHeaderParams) => React.ReactNode;
/**
* Class name that will be added in the column group header cell.
*/
headerClassName?: GridColumnGroupHeaderClassNamePropType;
}
export type GridColumnGroupingModel = GridColumnGroup[];