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

Function setActiveMenuItem

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

* Sets the active item to the item at the specified index and focuses the newly active item. * @param item The index of the item to be set as active, or the CdkMenuItem instance.

(item: number | CdkMenuItem)

Source from the content-addressed store, hash-verified

150 * @param item The index of the item to be set as active, or the CdkMenuItem instance.
151 */
152 setActiveMenuItem(item: number | CdkMenuItem) {
153 this.keyManager?.setActiveItem(item);
154 }
155
156 /** Gets the tabindex for this menu. */
157 _getTabIndex() {

Callers

nothing calls this directly

Calls 1

setActiveItemMethod · 0.45

Tested by

no test coverage detected