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

Method expand

src/aria/private/menu/menu.ts:443–452  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

441
442 /** Expands the current menu or focuses the next item in the menubar. */
443 expand() {
444 const root = this.root();
445 const activeItem = this.inputs.activeItem();
446
447 if (activeItem?.submenu()) {
448 activeItem.open({first: true});
449 } else if (root instanceof MenuBarPattern) {
450 root.next();
451 }
452 }
453
454 /** Closes the menu. */
455 close() {

Callers 1

MenuPatternClass · 0.95

Calls 3

activeItemMethod · 0.80
openMethod · 0.65
nextMethod · 0.45

Tested by

no test coverage detected