MCPcopy Index your code
hub / github.com/angular/components / collapse

Method collapse

src/cdk/tree/tree.ts:656–662  ·  view source on GitHub ↗

Collapse the data node. If it is already collapsed, does nothing.

(dataNode: T)

Source from the content-addressed store, hash-verified

654
655 /** Collapse the data node. If it is already collapsed, does nothing. */
656 collapse(dataNode: T): void {
657 if (this.treeControl) {
658 this.treeControl.collapse(dataNode);
659 } else if (this._expansionModel) {
660 this._expansionModel.deselect(this._getExpansionKey(dataNode));
661 }
662 }
663
664 /**
665 * If the data node is currently expanded, collapse it and all its descendants.

Callers

nothing calls this directly

Calls 3

_getExpansionKeyMethod · 0.95
collapseMethod · 0.65
deselectMethod · 0.65

Tested by

no test coverage detected