Skip to content

feat(cdk/menu): add setActiveMenuItem to cdkMenu #31371

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

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

chintankavathia
Copy link
Contributor

See #31370 for more details

@chintankavathia chintankavathia requested a review from a team as a code owner June 17, 2025 12:01
@chintankavathia chintankavathia requested review from andrewseguin and ok7sai and removed request for a team June 17, 2025 12:01
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: cdk/menu labels Jun 17, 2025
*/
setActiveMenuItem(item: number | CdkMenuItem) {
if (this.keyManager) {
if (typeof item === 'number') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this check, the key manager does it automatically.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes its not needed but typescript is not happy so I had to add.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Let's keep it as is and I'll clean it up later.

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jun 24, 2025
@angular-robot angular-robot bot requested a review from crisbeto June 24, 2025 08:34
@crisbeto crisbeto added the target: minor This PR is targeted for the next minor release label Jun 24, 2025
@crisbeto crisbeto merged commit 5564d7d into angular:main Jun 24, 2025
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: cdk/menu detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants