Open mangei opened 1 year ago
I'd be happy to make a PR for it, if possible.
I have the same problem. Do yoy have any solution? 😢
I have the same problem. Do yoy have any solution? 😢
Add an inner div with a flex layout and put the text and the icon in it.
Is this a regression?
The previous version in which this bug was not present was
14.x
Description
Since there was a change in mat-menu-item, that all icons are moved to the start, it is not possible anymore to place icons after the label. This breaks our current design (we have icons in front and after the label)
v15: https://github.com/angular/components/blob/15.2.x/src/material/menu/menu-item.html
v14: https://github.com/angular/components/blob/14.2.x/src/material/menu/menu-item.html
The solution would be to also support
iconPositionEnd
for mat-menu-items as it was done for mat-button.https://github.com/angular/components/blob/15.2.x/src/material/button/button.html#L11
matButtonIcon
should be supported as well.Bonus: It would probably be even better to not pull the icons automatically to a certain position (like it was before) or to have an additional attribute, so that an icon is not effected by the pulling (e.g.
iconPositionInline
--><mat-icon iconPositionInline>...</mat-icon>
). I am not sure, if this is possible with the new mdc and the change happened in the first place, because the new css-class effected the icons. Nevertheless, iconPositionEnd should be possible.Thank you! ~Manuel
Reproduction
Expected Behavior
It should be possible to have buttons at the start and at the end (or inline).
Actual Behavior
Both/all icons are in the start.
Environment