igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
221 lines (140 loc) • 5.95 kB
TypeScript
import { IgcGridBaseDirective } from './igc-grid-base-directive';
import { IgcTreeGridRecord } from './igc-tree-grid-record';
import { IgcRenderFunction } from './common';
import { IgcCellType } from './igc-cell-type';
import { IgcRowType } from './igc-row-type';
import { IgcGridBaseDirectiveEventMap } from './igc-grid-base-directive';
/* wcSkipComponentSuffix */
/* wcAlternateName: TreeGridBase */
/* blazorIndirectRender
blazorComponent
omitModule
wcSkipComponentSuffix */
/**
* **Ignite UI for Angular Tree Grid** -
* [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/grid)
* The Ignite UI Tree Grid displays and manipulates hierarchical data with consistent schema formatted as a table and
* provides features such as sorting, filtering, editing, column pinning, paging, column moving and hiding.
* Example:
*/
export declare class IgcTreeGridBaseComponent extends IgcGridBaseDirective
{
/**
* Sets the child data key of the tree grid.
*/
public set childDataKey(value: string);
public get childDataKey(): string;
/**
* Sets the foreign key of the tree grid.
*/
public set foreignKey(value: string);
public get foreignKey(): string;
/**
* Sets the key indicating whether a row has children.
* This property is only used for load on demand scenarios.
*/
public set hasChildrenKey(value: string);
public get hasChildrenKey(): string;
/**
* Sets whether child records should be deleted when their parent gets deleted.
* By default it is set to true and deletes all children along with the parent.
*/
public set cascadeOnDelete(value: boolean);
public get cascadeOnDelete(): boolean;
/* csSuppress */
/**
* Sets a callback for loading child rows on demand.
*/
public set loadChildrenOnDemand(value: any);
public get loadChildrenOnDemand(): any;
/**
* Sets the value of the `id` attribute. If not provided it will be automatically generated.
*/
public set id(value: string);
public get id(): string;
/**
* Returns an array of the root level `ITreeGridRecord`s.
*/
public set rootRecords(value: IgcTreeGridRecord[]);
public get rootRecords(): IgcTreeGridRecord[];
/**
* Returns an array of processed (filtered and sorted) root `ITreeGridRecord`s.
*/
public set processedRootRecords(value: IgcTreeGridRecord[]);
public get processedRootRecords(): IgcTreeGridRecord[];
/* treatAsRef */
/**
* Gets/Sets the array of data that populates the component.
*/
public set data(value: any[]);
public get data(): any[];
/**
* Sets the count of levels to be expanded in the tree grid. By default it is
* set to `Infinity` which means all levels would be expanded.
*/
public set expansionDepth(value: number);
public get expansionDepth(): number;
/**
* Template for the row loading indicator when load on demand is enabled.
*/
public set rowLoadingIndicatorTemplate(value: IgcRenderFunction<void>);
public get rowLoadingIndicatorTemplate(): IgcRenderFunction<void>;
/**
* Returns an array of the selected grid cells.
*/
public get selectedCells(): IgcCellType[];
public getDefaultExpandState(record: IgcTreeGridRecord): boolean;
/**
* Expands all rows.
*/
public expandAll(): void;
/**
* Collapses all rows.
*/
public collapseAll(): void;
/* blazorCSSuppress */
/**
* Creates a new tree grid row with the given data. If a parentRowID is not specified, the newly created
* row would be added at the root level. Otherwise, it would be added as a child of the row whose primaryKey matches
* the specified parentRowID. If the parentRowID does not exist, an error would be thrown.
* @param data
* @param parentRowID
*/
// TODO: remove evt emission
public addRow(data: any, parentRowID?: any): void;
/**
* Enters add mode by spawning the UI with the context of the specified row by index.
* @param index - The index to spawn the UI at. Accepts integers from 0 to this.grid.dataView.length
* @param asChild - Whether the record should be added as a child. Only applicable to igxTreeGrid.
*/
public beginAddRowByIndex(index: number, asChild?: boolean): void;
/**
* Returns an array of the current cell selection in the form of `[{ column.field: cell.value }, ...]`.
*/
public getSelectedData(formatters?: boolean, headers?: boolean): any[];
/**
* Returns the tree grid row by index.
* @param index
*/
public getRowByIndex(index: number): IgcRowType;
/**
* Returns the `RowType` object by the specified primary key.
* @param index
*/
public getRowByKey(key: any): IgcRowType;
/**
* Returns a `CellType` object that matches the conditions.
* @param rowIndex
* @param columnField
*/
public getCellByColumn(rowIndex: number, columnField: string): IgcCellType;
/**
* Returns a `CellType` object that matches the conditions.
* @param rowSelector match any rowID
* @param columnField
*/
public getCellByKey(rowSelector: any, columnField: string): IgcCellType;
public pinRow(rowID: any, index?: number): boolean;
public unpinRow(rowID: any): boolean;
}
export type IgcTreeGridBaseComponentEventMap = IgcGridBaseDirectiveEventMap