Skip to content

Commit

Permalink
refactor(material/menu): expose MenuCloseReason type (#26458)
Browse files Browse the repository at this point in the history
Exposes the `MenuCloseReason` type since it's used in the `closed` event of `MatMenu` which is a public API.

Fixes #26416.

(cherry picked from commit 0d07ccc)
  • Loading branch information
crisbeto committed Jan 20, 2023
1 parent 3c289d4 commit 98e6a85
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/material/menu/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
* found in the LICENSE file at https://angular.io/license
*/

export {MatMenu, _MatMenuBase, MAT_MENU_DEFAULT_OPTIONS, MatMenuDefaultOptions} from './menu';
export {
MatMenu,
_MatMenuBase,
MAT_MENU_DEFAULT_OPTIONS,
MatMenuDefaultOptions,
MenuCloseReason,
} from './menu';
export * from './menu-item';
export * from './menu-content';
export {
Expand Down
3 changes: 3 additions & 0 deletions tools/public_api_guard/material/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ export abstract class _MatMenuTriggerBase implements AfterContentInit, OnDestroy
// @public @deprecated
export const MENU_PANEL_TOP_PADDING = 8;

// @public
export type MenuCloseReason = void | 'click' | 'keydown' | 'tab';

// @public
export type MenuPositionX = 'before' | 'after';

Expand Down

0 comments on commit 98e6a85

Please sign in to comment.