MCPcopy Index your code
hub / github.com/angular/components / setDefaultState

Method setDefaultState

src/aria/private/menu/menu.ts:201–208  ·  view source on GitHub ↗

Sets the default state for the menu.

()

Source from the content-addressed store, hash-verified

199
200 /** Sets the default state for the menu. */
201 setDefaultState() {
202 if (!this.inputs.parent()) {
203 const firstFocusable = this.listBehavior.navigationBehavior.peekFirst();
204 if (firstFocusable) {
205 this.listBehavior.goto(firstFocusable, {focusElement: false});
206 }
207 }
208 }
209
210 /** Sets the default active state of the menu before receiving interaction for the first time. */
211 setDefaultStateEffect(): void {

Callers 4

setDefaultStateEffectMethod · 0.95
setDefaultStateEffectMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45

Calls 3

parentMethod · 0.80
peekFirstMethod · 0.45
gotoMethod · 0.45

Tested by

no test coverage detected