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

Method trigger

src/cdk/menu/menu-item.ts:130–138  ·  view source on GitHub ↗

* If the menu item is not disabled and the element does not have a menu trigger attached, emit * on the cdkMenuItemTriggered emitter and close all open menus. * @param options Options the configure how the item is triggered * - keepOpen: specifies that the menu should be kept open after t

(options?: {keepOpen: boolean})

Source from the content-addressed store, hash-verified

128 * - keepOpen: specifies that the menu should be kept open after triggering the item.
129 */
130 trigger(options?: {keepOpen: boolean}) {
131 const {keepOpen} = {...options};
132 if (!this.disabled && !this.hasMenu) {
133 this.triggered.next();
134 if (!keepOpen) {
135 this._menuStack.closeAll({focusParentTrigger: true});
136 }
137 }
138 }
139
140 /** Return true if this MenuItem has an attached menu and it is open. */
141 isMenuOpen() {

Callers 10

_handleClickMethod · 0.95
_onKeydownMethod · 0.95
menu-bar.spec.tsFile · 0.45
menu-group.spec.tsFile · 0.45
menu.spec.tsFile · 0.45
ngAfterViewInitMethod · 0.45

Calls 2

nextMethod · 0.45
closeAllMethod · 0.45

Tested by

no test coverage detected