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

Method _hovered

src/material/menu/menu.ts:336–343  ·  view source on GitHub ↗

Stream that emits whenever the hovered menu item changes.

()

Source from the content-addressed store, hash-verified

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