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

Method prev

src/aria/private/menu/menu.ts:621–629  ·  view source on GitHub ↗

Focuses the previous menu item.

()

Source from the content-addressed store, hash-verified

619
620 /** Focuses the previous menu item. */
621 prev() {
622 const prevItem = this.inputs.activeItem();
623 this.listBehavior.prev();
624
625 if (prevItem?.expanded()) {
626 prevItem?.close();
627 this.inputs.activeItem()?.open({first: true});
628 }
629 }
630
631 /** Closes the menubar and refocuses the root menu bar item. */
632 close() {

Callers 1

MenuBarPatternClass · 0.95

Calls 5

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

Tested by

no test coverage detected