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

Function collapseDescendants

src/cdk/tree/control/base-tree-control.ts:91–95  ·  view source on GitHub ↗

Collapses a subtree rooted at given data node recursively.

(dataNode: T)

Source from the content-addressed store, hash-verified

89
90 /** Collapses a subtree rooted at given data node recursively. */
91 collapseDescendants(dataNode: T): void {
92 let toBeProcessed = [dataNode];
93 toBeProcessed.push(...this.getDescendants(dataNode));
94 this.expansionModel.deselect(...toBeProcessed.map(value => this._trackByValue(value)));
95 }
96
97 protected _trackByValue(value: T | K): K {
98 return this.trackBy ? this.trackBy(value as T) : (value as K);

Callers

nothing calls this directly

Calls 3

pushMethod · 0.65
getDescendantsMethod · 0.65
deselectMethod · 0.65

Tested by

no test coverage detected