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

Method setDefaultState

src/aria/private/menu/menu.ts:551–556  ·  view source on GitHub ↗

Sets the default state for the menubar.

()

Source from the content-addressed store, hash-verified

549
550 /** Sets the default state for the menubar. */
551 setDefaultState() {
552 const firstFocusable = this.listBehavior.navigationBehavior.peekFirst();
553 if (firstFocusable) {
554 this.inputs.activeItem.set(firstFocusable);
555 }
556 }
557
558 /** Sets the default active state of the menubar before receiving interaction for the first time. */
559 setDefaultStateEffect(): void {

Callers 1

setDefaultStateEffectMethod · 0.95

Calls 2

setMethod · 0.80
peekFirstMethod · 0.45

Tested by

no test coverage detected