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

Method next

src/aria/private/menu/menu.ts:636–644  ·  view source on GitHub ↗

Focuses the next menu item.

()

Source from the content-addressed store, hash-verified

634
635 /** Focuses the next menu item. */
636 next() {
637 const prevItem = this.inputs.activeItem();
638 this.listBehavior.next();
639
640 if (prevItem?.expanded()) {
641 prevItem?.close();
642 this.inputs.activeItem()?.open({first: true});
643 }
644 }
645
646 /** Focuses the previous menu item. */
647 prev() {

Callers 1

MenuBarPatternClass · 0.95

Calls 5

activeItemMethod · 0.80
expandedMethod · 0.80
openMethod · 0.65
nextMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected