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

Method open

src/aria/private/menu/menu.ts:767–775  ·  view source on GitHub ↗

Opens the menu.

(opts?: {first?: boolean; last?: boolean})

Source from the content-addressed store, hash-verified

765
766 /** Opens the menu. */
767 open(opts?: {first?: boolean; last?: boolean}) {
768 this.expanded.set(true);
769
770 if (opts?.first) {
771 this.pendingFocus.set('first');
772 } else if (opts?.last) {
773 this.pendingFocus.set('last');
774 }
775 }
776
777 /** Closes the menu. */
778 close(opts: {refocus?: boolean} = {}) {

Callers 2

MenuTriggerPatternClass · 0.95
onClickMethod · 0.95

Calls 1

setMethod · 0.80

Tested by

no test coverage detected