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

Method expand

src/aria/private/menu/menu.ts:427–436  ·  view source on GitHub ↗

Expands the current menu or focuses the next item in the menubar.

()

Source from the content-addressed store, hash-verified

425
426 /** Expands the current menu or focuses the next item in the menubar. */
427 expand() {
428 const root = this.root();
429 const activeItem = this.inputs.activeItem();
430
431 if (activeItem?.submenu()) {
432 activeItem.open({first: true});
433 } else if (root instanceof MenuBarPattern) {
434 root.next();
435 }
436 }
437
438 /** Closes the menu. */
439 close() {

Callers 1

MenuPatternClass · 0.95

Calls 3

activeItemMethod · 0.80
openMethod · 0.65
nextMethod · 0.45

Tested by

no test coverage detected