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

Function focusFirstItem

src/cdk/menu/menu-base.ts:134–137  ·  view source on GitHub ↗

* Place focus on the first MenuItem in the menu and set the focus origin. * @param focusOrigin The origin input mode of the focus event.

(focusOrigin: FocusOrigin = 'program')

Source from the content-addressed store, hash-verified

132 * @param focusOrigin The origin input mode of the focus event.
133 */
134 focusFirstItem(focusOrigin: FocusOrigin = 'program') {
135 this.keyManager.setFocusOrigin(focusOrigin);
136 this.keyManager.setFirstItemActive();
137 }
138
139 /**
140 * Place focus on the last MenuItem in the menu and set the focus origin.

Callers

nothing calls this directly

Calls 2

setFocusOriginMethod · 0.80
setFirstItemActiveMethod · 0.80

Tested by

no test coverage detected