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

Method _hovered

src/material/menu/menu.ts:338–345  ·  view source on GitHub ↗

Stream that emits whenever the hovered menu item changes.

()

Source from the content-addressed store, hash-verified

336
337 /** Stream that emits whenever the hovered menu item changes. */
338 _hovered(): Observable<MatMenuItem> {
339 // Coerce the `changes` property because Angular types it as `Observable<any>`
340 const itemChanges = this._directDescendantItems.changes as Observable<QueryList<MatMenuItem>>;
341 return itemChanges.pipe(
342 startWith(this._directDescendantItems),
343 switchMap(items => merge(...items.map((item: MatMenuItem) => item._hovered))),
344 ) as Observable<MatMenuItem>;
345 }
346
347 /*
348 * Registers a menu item with the menu.

Callers 3

_handleHoverMethod · 0.80
_menuClosingActionsFunction · 0.80
menu.spec.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected