UNPKG

1.01 kBTypeScriptView Raw
1export declare const NB_DEFAULT_ROW_LEVEL: number;
2export type NbDataGetter<N, T> = (N: any) => T;
3export type NbChildrenGetter<N, T> = (N: any) => (T[] | undefined);
4export type NbExpandedGetter<N> = (N: any) => boolean;
5export interface NbGetters<N, T> {
6 dataGetter?: NbDataGetter<N, T>;
7 childrenGetter?: NbChildrenGetter<N, T>;
8 expandedGetter?: NbExpandedGetter<N>;
9}
10/**
11 * Implicit context of cells and rows
12 */
13export declare class NbTreeGridPresentationNode<T> {
14 /**
15 * Data object associated with row
16 */
17 readonly data: T;
18 children: NbTreeGridPresentationNode<T>[] | undefined;
19 /**
20 * Row expand state
21 */
22 expanded: boolean;
23 readonly level: number;
24 constructor(
25 /**
26 * Data object associated with row
27 */
28 data: T, children: NbTreeGridPresentationNode<T>[] | undefined,
29 /**
30 * Row expand state
31 */
32 expanded: boolean, level: number);
33 /**
34 * True if row has child rows
35 */
36 hasChildren(): boolean;
37}