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

Method _setTabIndex

src/cdk/menu/menu-item.ts:174–183  ·  view source on GitHub ↗

* Set the tab index to 0 if not disabled and it's a focus event, or a mouse enter if this element * is not in a menu bar.

(event?: MouseEvent)

Source from the content-addressed store, hash-verified

172 * is not in a menu bar.
173 */
174 _setTabIndex(event?: MouseEvent) {
175 if (this.disabled) {
176 return;
177 }
178
179 // don't set the tabindex if there are no open sibling or parent menus
180 if (!event || !this._menuStack.isEmpty()) {
181 this._tabindex = 0;
182 }
183 }
184
185 /** Handles click events on the item. */
186 protected _handleClick(event: MouseEvent) {

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected