MCPcopy Create free account
hub / github.com/angular/components / constructor

Method constructor

src/cdk/tree/control/flat-tree-control.ts:25–35  ·  view source on GitHub ↗

Construct with flat tree data node functions getLevel and isExpandable.

(
    public override getLevel: (dataNode: T) => number,
    public override isExpandable: (dataNode: T) => boolean,
    public options?: FlatTreeControlOptions<T, K>,
  )

Source from the content-addressed store, hash-verified

23export class FlatTreeControl<T, K = T> extends BaseTreeControl<T, K> {
24 /** Construct with flat tree data node functions getLevel and isExpandable. */
25 constructor(
26 public override getLevel: (dataNode: T) => number,
27 public override isExpandable: (dataNode: T) => boolean,
28 public options?: FlatTreeControlOptions<T, K>,
29 ) {
30 super();
31
32 if (this.options) {
33 this.trackBy = this.options.trackBy;
34 }
35 }
36
37 /**
38 * Gets a list of the data node's subtree of descendent data nodes.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected