MCPcopy
hub / github.com/angular/components / collapseAll

Method collapseAll

src/cdk/tree/tree.ts:722–728  ·  view source on GitHub ↗

Collapse all data nodes in the tree.

()

Source from the content-addressed store, hash-verified

720
721 /** Collapse all data nodes in the tree. */
722 collapseAll(): void {
723 if (this.treeControl) {
724 this.treeControl.collapseAll();
725 } else if (this._expansionModel) {
726 this._forEachExpansionKey(keys => this._expansionModel?.deselect(...keys));
727 }
728 }
729
730 /** Level accessor, used for compatibility between the old Tree and new Tree */
731 _getLevelAccessor() {

Callers

nothing calls this directly

Calls 3

_forEachExpansionKeyMethod · 0.95
collapseAllMethod · 0.65
deselectMethod · 0.65

Tested by

no test coverage detected