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

Method trigger

src/aria/private/menu/menu.ts:385–389  ·  view source on GitHub ↗

Triggers the active menu item.

()

Source from the content-addressed store, hash-verified

383
384 /** Triggers the active menu item. */
385 trigger() {
386 this.inputs.activeItem()?.hasPopup()
387 ? this.inputs.activeItem()?.open({first: true})
388 : this.submit();
389 }
390
391 /** Submits the menu. */
392 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