Returns a stream that emits whenever an action that should close the menu occurs.
()
| 452 | |
| 453 | /** Returns a stream that emits whenever an action that should close the menu occurs. */ |
| 454 | private _menuClosingActions() { |
| 455 | const outsideClicks = this._getOutsideClickStream(this._overlayRef!); |
| 456 | const detachments = this._overlayRef!.detachments(); |
| 457 | const parentClose = this._parentMaterialMenu ? this._parentMaterialMenu.closed : observableOf(); |
| 458 | const hover = this._parentMaterialMenu |
| 459 | ? this._parentMaterialMenu |
| 460 | ._hovered() |
| 461 | .pipe(filter(active => this._menuOpen && active !== this._menuItemInstance)) |
| 462 | : observableOf(); |
| 463 | |
| 464 | return merge(outsideClicks, parentClose as Observable<MenuCloseReason>, hover, detachments); |
| 465 | } |
| 466 | |
| 467 | /** Gets the portal that should be attached to the overlay. */ |
| 468 | private _getPortal(menu: MatMenuPanel): TemplatePortal { |
nothing calls this directly
no test coverage detected