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

TabMenu: Tab selection is not actionable due to missing output #12310

Closed
sbarfurth opened this issue Nov 30, 2022 · 0 comments · Fixed by #12311
Closed

TabMenu: Tab selection is not actionable due to missing output #12310

sbarfurth opened this issue Nov 30, 2022 · 0 comments · Fixed by #12311
Labels
Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@sbarfurth
Copy link
Contributor

Describe the feature you would like to see added

The TabMenu component does not expose any events or observables. This makes the tab selection fully opaque from the outside. When the active tab is changed within the component, the parent component does not know this. The only way to handle tab changes currently is the usage of the command property on the MenuItem but this seems cumbersome. It would be great if the TabMenu could simply emit an event when a tab is selected.

Is your feature request related to a problem?

When trying to wrap the tab menu it is impossible to keep track of the selected tab in the wrapper component without using complex change detection and patching the command property on the menu items. This is frustrating considering the only missing piece is a single event.

Describe the solution you'd like

Whenever a tab is selected an event is emitted with the MenuItem that was selected. Ideally this event also allows for two-way binding on the activeItem input (https://angular.io/guide/two-way-binding).

Describe alternatives you have considered

No response

Additional context

No response

@sbarfurth sbarfurth added Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: New Feature Issue contains a new feature or new component request labels Nov 30, 2022
@cetincakiroglu cetincakiroglu added this to the 15.0.0 milestone Dec 2, 2022
@cetincakiroglu cetincakiroglu removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Status: Discussion Issue or pull request needs to be discussed by Core Team labels Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants