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

Method trigger

src/aria/private/menu/menu.ts:388–392  ·  view source on GitHub ↗

Triggers the active menu item.

()

Source from the content-addressed store, hash-verified

386
387 /** Triggers the active menu item. */
388 trigger() {
389 this.inputs.activeItem()?.hasPopup()
390 ? this.inputs.activeItem()?.open({first: true})
391 : this.submit();
392 }
393
394 /** Submits the menu. */
395 submit(item = this.inputs.activeItem()) {

Callers 1

MenuPatternClass · 0.95

Calls 3

submitMethod · 0.95
activeItemMethod · 0.80
openMethod · 0.65

Tested by

no test coverage detected