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

Method onClick

src/aria/private/menu/menu.ts:311–320  ·  view source on GitHub ↗

Handles click events for the menu.

(event: MouseEvent)

Source from the content-addressed store, hash-verified

309
310 /** Handles click events for the menu. */
311 onClick(event: MouseEvent) {
312 const relatedTarget = event.target as Node | null;
313 const item = this.inputs.items().find(i => i.element()?.contains(relatedTarget));
314
315 if (item) {
316 item.open();
317 this.listBehavior.goto(item);
318 this.submit(item);
319 }
320 }
321
322 /** Handles focusin events for the menu. */
323 onFocusIn() {

Callers 1

menu.spec.tsFile · 0.45

Calls 4

submitMethod · 0.95
openMethod · 0.65
elementMethod · 0.45
gotoMethod · 0.45

Tested by

no test coverage detected