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

Method collapse

src/material/tree/testing/node-harness.ts:74–78  ·  view source on GitHub ↗

Collapses the node if it is expanded. Only works when node is not disabled.

()

Source from the content-addressed store, hash-verified

72
73 /** Collapses the node if it is expanded. Only works when node is not disabled. */
74 async collapse(): Promise<void> {
75 if (await this.isExpanded()) {
76 await this.toggle();
77 }
78 }
79}
80
81function getNodePredicate<T extends MatTreeNodeHarness>(

Callers

nothing calls this directly

Calls 2

isExpandedMethod · 0.95
toggleMethod · 0.95

Tested by

no test coverage detected