Skip to content

fix(material/menu): missing panelClass getter#33191

Merged
ok7sai merged 1 commit intoangular:mainfrom
ok7sai:fix/mat-menu
May 3, 2026
Merged

fix(material/menu): missing panelClass getter#33191
ok7sai merged 1 commit intoangular:mainfrom
ok7sai:fix/mat-menu

Conversation

@ok7sai
Copy link
Copy Markdown
Member

@ok7sai ok7sai commented May 3, 2026

No description provided.

@ok7sai ok7sai marked this pull request as ready for review May 3, 2026 03:31
@pullapprove pullapprove Bot requested review from tjshiu and wagnermaciel May 3, 2026 03:31
@ok7sai ok7sai requested a review from crisbeto May 3, 2026 03:31
Comment thread src/material/menu/menu.ts
* @param classes list of class names
*/
@Input('class')
get panelClass(): string {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there context behind this change? I don't feel strongly against it, it's just been like that for a long time and it never came up.

Copy link
Copy Markdown
Member Author

@ok7sai ok7sai May 3, 2026

Choose a reason for hiding this comment

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

There's an internal design system tries to override the menu style with a directive that does something like

this.matMenu.panelClass = `${this.matMenu.panelClass} new-theme`;

Which is not working currently because without a getter this.matMenu.panelClass always return undefined.

The above code exists today while it doesn't work. It's not raised up probably because 1) the directive is newly added and 2) there's no panelClass usage along with the directive yet... until now that I am using it.

@ok7sai ok7sai added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels May 3, 2026
@ok7sai ok7sai merged commit 9d73c98 into angular:main May 3, 2026
32 checks passed
@ok7sai
Copy link
Copy Markdown
Member Author

ok7sai commented May 3, 2026

This PR was merged into the repository. The changes were merged into the following branches:

@ok7sai ok7sai deleted the fix/mat-menu branch May 3, 2026 09:37
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: material/menu 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