UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

153 lines (148 loc) 5.15 kB
import * as React from 'react'; import { IgrTreeGridRecord } from "./igr-tree-grid-record"; import { IgrRowType } from "./igr-row-type"; import { IgrCellType } from "./igr-cell-type"; import { IgrGridBaseDirective, IIgrGridBaseDirectiveProps } from "./igr-grid-base-directive"; import { TreeGrid } from "./TreeGrid"; export declare class IgrTreeGrid extends IgrGridBaseDirective<IIgrTreeGridProps & Omit<React.HTMLAttributes<HTMLElement>, keyof IIgrTreeGridProps>> { protected createImplementation(): TreeGrid; /** * @hidden */ get i(): TreeGrid; constructor(props: IIgrTreeGridProps & Omit<React.HTMLAttributes<HTMLElement>, keyof IIgrTreeGridProps>); componentDidMount(): void; render(): React.DetailedReactHTMLElement<any, HTMLElement>; protected _elRef: HTMLElement; protected _getMainRef(ref: any): void; get childDataKey(): string; set childDataKey(v: string); get foreignKey(): string; set foreignKey(v: string); get hasChildrenKey(): string; set hasChildrenKey(v: string); get cascadeOnDelete(): boolean; set cascadeOnDelete(v: boolean); get id(): string; set id(v: string); /** * Returns an array of the root level `ITreeGridRecord`s. * ```typescript * // gets the root record with index=2 * const states = this.grid.rootRecords[2]; * ``` * @memberof IgxTreeGridComponent */ get rootRecords(): IgrTreeGridRecord[]; set rootRecords(v: IgrTreeGridRecord[]); /** * Returns an array of processed (filtered and sorted) root `ITreeGridRecord`s. * ```typescript * // gets the processed root record with index=2 * const states = this.grid.processedRootRecords[2]; * ``` * @memberof IgxTreeGridComponent */ get processedRootRecords(): IgrTreeGridRecord[]; set processedRootRecords(v: IgrTreeGridRecord[]); get data(): any[]; set data(v: any[]); get expansionDepth(): number; set expansionDepth(v: number); private _rowLoadingIndicatorTemplate; private _rowLoadingIndicatorTemplateAdapter; get rowLoadingIndicatorTemplate(): React.FunctionComponent<{ dataContext: any; }> | React.Component<{ dataContext: any; }>; set rowLoadingIndicatorTemplate(v: React.FunctionComponent<{ dataContext: any; }> | React.Component<{ dataContext: any; }>); /** * Returns an array of the selected `IgxGridCell`s. * @example * ```typescript * const selectedCells = this.grid.selectedCells; * ``` */ get selectedCells(): IgrCellType[]; getDefaultExpandState(record: IgrTreeGridRecord): void; /** * Expands all rows. * ```typescript * this.grid.expandAll(); * ``` * @memberof IgxTreeGridComponent */ expandAll(): void; /** * Collapses all rows. * ```typescript * this.grid.collapseAll(); * ``` * @memberof IgxTreeGridComponent */ collapseAll(): void; addRow(data: any, parentRowID: any): void; beginAddRowByIndex(index: number, asChild?: boolean): void; getSelectedData(formatters?: boolean, headers?: boolean): any[]; /** * Returns the `IgxTreeGridRow` by index. * @example * ```typescript * const myRow = treeGrid.getRowByIndex(1); * ``` * index * @param * index */ getRowByIndex(index: number): IgrRowType; /** * Returns the `RowType` object by the specified primary key. * @example * ```typescript * const myRow = this.treeGrid.getRowByIndex(1); * ``` * index * @param * index */ getRowByKey(key: any): IgrRowType; getCellByColumn(rowIndex: number, columnField: string): IgrCellType; getCellByKey(rowSelector: any, columnField: string): IgrCellType; pinRow(rowID: any, index?: number): boolean; unpinRow(rowID: any): boolean; } export interface IIgrTreeGridProps extends IIgrGridBaseDirectiveProps { childDataKey?: string; foreignKey?: string; hasChildrenKey?: string; cascadeOnDelete?: boolean | string; id?: string; /** * Returns an array of the root level `ITreeGridRecord`s. * ```typescript * // gets the root record with index=2 * const states = this.grid.rootRecords[2]; * ``` * @memberof IgxTreeGridComponent */ rootRecords?: IgrTreeGridRecord[]; /** * Returns an array of processed (filtered and sorted) root `ITreeGridRecord`s. * ```typescript * // gets the processed root record with index=2 * const states = this.grid.processedRootRecords[2]; * ``` * @memberof IgxTreeGridComponent */ processedRootRecords?: IgrTreeGridRecord[]; data?: any[]; expansionDepth?: number | string; rowLoadingIndicatorTemplate?: React.FunctionComponent<{ dataContext: any; }> | React.Component<{ dataContext: any; }>; }