source: trip-planner-front/node_modules/@angular/cdk/tree/control/nested-tree-control.d.ts@ 6fe77af

Last change on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { Observable } from 'rxjs';
9import { BaseTreeControl } from './base-tree-control';
10/** Optional set of configuration that can be provided to the NestedTreeControl. */
11export interface NestedTreeControlOptions<T, K> {
12 trackBy?: (dataNode: T) => K;
13}
14/** Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type. */
15export declare class NestedTreeControl<T, K = T> extends BaseTreeControl<T, K> {
16 getChildren: (dataNode: T) => (Observable<T[]> | T[] | undefined | null);
17 options?: NestedTreeControlOptions<T, K> | undefined;
18 /** Construct with nested tree function getChildren. */
19 constructor(getChildren: (dataNode: T) => (Observable<T[]> | T[] | undefined | null), options?: NestedTreeControlOptions<T, K> | undefined);
20 /**
21 * Expands all dataNodes in the tree.
22 *
23 * To make this working, the `dataNodes` variable of the TreeControl must be set to all root level
24 * data nodes of the tree.
25 */
26 expandAll(): void;
27 /** Gets a list of descendant dataNodes of a subtree rooted at given data node recursively. */
28 getDescendants(dataNode: T): T[];
29 /** A helper function to get descendants recursively. */
30 protected _getDescendants(descendants: T[], dataNode: T): void;
31}
Note: See TracBrowser for help on using the repository browser.