@@ -107,10 +107,22 @@ export class MatMenuTrigger implements AfterContentInit, OnDestroy {
107107 @Input ( 'matMenuTriggerFor' ) menu : MatMenuPanel ;
108108
109109 /** Event emitted when the associated menu is opened. */
110- @Output ( ) onMenuOpen = new EventEmitter < void > ( ) ;
110+ @Output ( ) menuOpened = new EventEmitter < void > ( ) ;
111+
112+ /**
113+ * Event emitted when the associated menu is opened.
114+ * @deprecated Switch to `menuOpened` instead
115+ */
116+ @Output ( ) onMenuOpen = this . menuOpened ;
111117
112118 /** Event emitted when the associated menu is closed. */
113- @Output ( ) onMenuClose = new EventEmitter < void > ( ) ;
119+ @Output ( ) menuClosed = new EventEmitter < void > ( ) ;
120+
121+ /**
122+ * Event emitted when the associated menu is closed.
123+ * @deprecated Switch to `menuClosed` instead
124+ */
125+ @Output ( ) onMenuClose = this . menuClosed ;
114126
115127 constructor ( private _overlay : Overlay ,
116128 private _element : ElementRef ,
@@ -133,13 +145,13 @@ export class MatMenuTrigger implements AfterContentInit, OnDestroy {
133145
134146 // If a click closed the menu, we should close the entire chain of nested menus.
135147 if ( reason === 'click' && this . _parentMenu ) {
136- this . _parentMenu . close . emit ( reason ) ;
148+ this . _parentMenu . closed . emit ( reason ) ;
137149 }
138150 } ) ;
139151
140152 if ( this . triggersSubmenu ( ) ) {
141153 // Subscribe to changes in the hovered item in order to toggle the panel.
142- this . _hoverSubscription = this . _parentMenu . hover ( )
154+ this . _hoverSubscription = this . _parentMenu . _hovered ( )
143155 . pipe ( filter ( active => active === this . _menuItemInstance ) )
144156 . subscribe ( ( ) => {
145157 this . _openedByMouse = true ;
@@ -273,7 +285,7 @@ export class MatMenuTrigger implements AfterContentInit, OnDestroy {
273285 // set state rather than toggle to support triggers sharing a menu
274286 private _setIsMenuOpen ( isOpen : boolean ) : void {
275287 this . _menuOpen = isOpen ;
276- this . _menuOpen ? this . onMenuOpen . emit ( ) : this . onMenuClose . emit ( ) ;
288+ this . _menuOpen ? this . menuOpened . emit ( ) : this . menuClosed . emit ( ) ;
277289
278290 if ( this . triggersSubmenu ( ) ) {
279291 this . _menuItemInstance . _highlighted = isOpen ;
@@ -388,7 +400,7 @@ export class MatMenuTrigger implements AfterContentInit, OnDestroy {
388400 private _menuClosingActions ( ) {
389401 const backdrop = this . _overlayRef ! . backdropClick ( ) ;
390402 const parentClose = this . _parentMenu ? this . _parentMenu . close : observableOf ( ) ;
391- const hover = this . _parentMenu ? this . _parentMenu . hover ( ) . pipe (
403+ const hover = this . _parentMenu ? this . _parentMenu . _hovered ( ) . pipe (
392404 filter ( active => active !== this . _menuItemInstance ) ,
393405 filter ( ( ) => this . _menuOpen )
394406 ) : observableOf ( ) ;
0 commit comments