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

Method expand

src/aria/private/menu/menu.ts:424–433  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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

Callers 1

MenuPatternClass · 0.95

Calls 3

activeItemMethod · 0.80
openMethod · 0.65
nextMethod · 0.45

Tested by

no test coverage detected