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

Method close

src/cdk/menu/menu-trigger.ts:131–139  ·  view source on GitHub ↗

Close the opened menu.

()

Source from the content-addressed store, hash-verified

129
130 /** Close the opened menu. */
131 close() {
132 if (this.isOpen()) {
133 this.closed.next();
134
135 this.overlayRef!.detach();
136 this._changeDetectorRef.markForCheck();
137 }
138 this._closeSiblingTriggers();
139 }
140
141 /**
142 * Get a reference to the rendered Menu if the Menu is open and rendered in the DOM.

Callers 2

toggleMethod · 0.95
_registerCloseHandlerMethod · 0.95

Calls 5

_closeSiblingTriggersMethod · 0.95
markForCheckMethod · 0.80
detachMethod · 0.65
isOpenMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected