Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(menu): type MenuCloseReason not exported in public api #26416

Closed
1 task
rb-mwindh opened this issue Jan 12, 2023 · 2 comments · Fixed by #26458
Closed
1 task

bug(menu): type MenuCloseReason not exported in public api #26416

rb-mwindh opened this issue Jan 12, 2023 · 2 comments · Fixed by #26458
Assignees
Labels
area: material/menu P4 A relatively minor issue that is not relevant to core functions

Comments

@rb-mwindh
Copy link

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

The type MenuCloseReason is not exposed through public api.

It's been around for quite some time now, so I guess it's pretty stable. Why not make it part of the public api, pretty please?

Reproduction

Steps to reproduce:

  1. create a component that contains a <mat-menu>
  2. listen to the (closed) event
  3. use the event type (MenuClosedReason) in the event handler function
import { MenuCloseReason } from '@angular/material/menu';

@NgModule({
  template: `<mat-module (closed)="onMenuClose($event)"></mat-menu>`
})
export class TestComponent {
  onMenuClose(event: MenuCloseReason): void {
  }
}

Expected Behavior

public api of mat-menu should export MenuCloseReason.

Actual Behavior

public api of mat-menu does not export MenuCloseReason.

Environment

  • Angular: 13.x, 14.x, 15.x
  • CDK/Material: 13.x, 14.x, 15.x
  • Browser(s): n/a
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@rb-mwindh rb-mwindh added the needs triage This issue needs to be triaged by the team label Jan 12, 2023
@crisbeto crisbeto self-assigned this Jan 19, 2023
@crisbeto crisbeto added P4 A relatively minor issue that is not relevant to core functions area: material/menu and removed needs triage This issue needs to be triaged by the team labels Jan 19, 2023
crisbeto added a commit to crisbeto/material2 that referenced this issue Jan 19, 2023
Exposes the `MenuCloseReason` type since it's used in the `closed` event of `MatMenu` which is a public API.

Fixes angular#26416.
crisbeto added a commit that referenced this issue Jan 20, 2023
Exposes the `MenuCloseReason` type since it's used in the `closed` event of `MatMenu` which is a public API.

Fixes #26416.
crisbeto added a commit that referenced this issue Jan 20, 2023
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)
@rb-mwindh
Copy link
Author

Thank you very much, @crisbeto
Your help is much appreciated 😍

Btw. could you please tell me when and in what version will the fix be available?

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/menu P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants