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

Function focusLastItem

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

* Place focus on the last 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

141 * @param focusOrigin The origin input mode of the focus event.
142 */
143 focusLastItem(focusOrigin: FocusOrigin = 'program') {
144 this.keyManager.setFocusOrigin(focusOrigin);
145 this.keyManager.setLastItemActive();
146 }
147
148 /**
149 * Sets the active item to the item at the specified index and focuses the newly active item.

Callers

nothing calls this directly

Calls 2

setFocusOriginMethod · 0.80
setLastItemActiveMethod · 0.80

Tested by

no test coverage detected