Skip to content

Commit 98e6a85

Browse files
committed
refactor(material/menu): expose MenuCloseReason type (#26458)
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)
1 parent 3c289d4 commit 98e6a85

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/material/menu/public-api.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
export {MatMenu, _MatMenuBase, MAT_MENU_DEFAULT_OPTIONS, MatMenuDefaultOptions} from './menu';
9+
export {
10+
MatMenu,
11+
_MatMenuBase,
12+
MAT_MENU_DEFAULT_OPTIONS,
13+
MatMenuDefaultOptions,
14+
MenuCloseReason,
15+
} from './menu';
1016
export * from './menu-item';
1117
export * from './menu-content';
1218
export {

tools/public_api_guard/material/menu.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,9 @@ export abstract class _MatMenuTriggerBase implements AfterContentInit, OnDestroy
326326
// @public @deprecated
327327
export const MENU_PANEL_TOP_PADDING = 8;
328328

329+
// @public
330+
export type MenuCloseReason = void | 'click' | 'keydown' | 'tab';
331+
329332
// @public
330333
export type MenuPositionX = 'before' | 'after';
331334

0 commit comments

Comments
 (0)