Skip to content

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
crisbeto added a commit to crisbeto/material2 that referenced this pull request Jun 29, 2025
This is a follow-up to angular#31371 (comment). `ListKeyManager.setActiveItem` supports both a reference to an item or an index, however there's no override that allows `T | number` which can be inconvenient.

These changes add extra overrides to resolve the issue.
crisbeto added a commit that referenced this pull request Jul 1, 2025
)

This is a follow-up to #31371 (comment). `ListKeyManager.setActiveItem` supports both a reference to an item or an index, however there's no override that allows `T | number` which can be inconvenient.

These changes add extra overrides to resolve the issue.
@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 Jul 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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