MCPcopy Index your code
hub / github.com/angular/components / expand

Method expand

src/aria/private/menu/menu.ts:423–432  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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

Callers 1

MenuPatternClass · 0.95

Calls 3

activeItemMethod · 0.80
openMethod · 0.65
nextMethod · 0.45

Tested by

no test coverage detected