ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
44 lines (43 loc) • 1.49 kB
TypeScript
import { IComponent } from "../../interfaces/iComponent";
import { RowNode } from "../../entities/rowNode";
import { ColDef } from "../../entities/colDef";
import { Column } from "../../entities/column";
import { GridApi } from "../../gridApi";
import { ColumnApi } from "../../columnController/columnApi";
export interface ICellRendererParams {
value: any;
valueFormatted: any;
getValue: () => any;
setValue: (value: any) => void;
formatValue: (value: any) => any;
data: any;
node: RowNode;
colDef: ColDef;
column: Column;
$scope: any;
rowIndex: number;
api: GridApi;
columnApi: ColumnApi;
context: any;
refreshCell: () => void;
eGridCell: HTMLElement;
eParentOfValue: HTMLElement;
registerRowDragger: (rowDraggerElement: HTMLElement, dragStartPixels?: number) => void;
addRenderedRowListener: (eventType: string, listener: Function) => void;
}
export interface ISetFilterCellRendererParams {
value: any;
valueFormatted: any;
api?: GridApi | null;
context: any;
}
export interface ICellRenderer {
/** Get the cell to refresh. Return true if successful. Return false if not (or you don't have refresh logic),
* then the grid will refresh the cell for you. */
refresh(params: ICellRendererParams): boolean;
}
export interface ICellRendererComp extends ICellRenderer, IComponent<ICellRendererParams> {
}
export interface ICellRendererFunc {
(params: any): HTMLElement | string;
}