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

Method _closeSiblingTriggers

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

Close out any sibling menu trigger menus.

()

Source from the content-addressed store, hash-verified

255
256 /** Close out any sibling menu trigger menus. */
257 private _closeSiblingTriggers() {
258 if (this._parentMenu) {
259 // If nothing was removed from the stack and the last element is not the parent item
260 // that means that the parent menu is a menu bar since we don't put the menu bar on the
261 // stack
262 const isParentMenuBar =
263 !this.menuStack.closeSubMenuOf(this._parentMenu) &&
264 this.menuStack.peek() !== this._parentMenu;
265
266 if (isParentMenuBar) {
267 this.menuStack.closeAll();
268 }
269 } else {
270 this.menuStack.closeAll();
271 }
272 }
273
274 /** Get the configuration object used to create the overlay. */
275 private _getOverlayConfig() {

Callers 3

closeMethod · 0.95
toggleMenusMethod · 0.95

Calls 3

closeSubMenuOfMethod · 0.80
peekMethod · 0.45
closeAllMethod · 0.45

Tested by

no test coverage detected