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

Function _setIsMenuOpen

src/material/menu/menu-trigger-base.ts:324–335  ·  view source on GitHub ↗
(isOpen: boolean)

Source from the content-addressed store, hash-verified

322
323 // set state rather than toggle to support triggers sharing a menu
324 private _setIsMenuOpen(isOpen: boolean): void {
325 if (isOpen !== this._menuOpen) {
326 this._menuOpen = isOpen;
327 this._menuOpen ? this.menuOpened.emit() : this.menuClosed.emit();
328
329 if (this._triggersSubmenu()) {
330 this._menuItemInstance._setHighlighted(isOpen);
331 }
332
333 this._changeDetectorRef.markForCheck();
334 }
335 }
336
337 /**
338 * This method creates the overlay from the provided menu's template and saves its

Callers

nothing calls this directly

Calls 2

_setHighlightedMethod · 0.80
markForCheckMethod · 0.80

Tested by

no test coverage detected