Describe the bug
The PanelMenu MenuItem has a style property for "Inline style of the menuitem". But, specifying styles using that property does not apply the styles.
E.g.,
this.items = [
{
label: 'Files',
icon: 'pi pi-file',
items: [
{
label: 'Documents',
icon: 'pi pi-file',
style: { color: 'red !important' },
}
// ...
]
}
]
The Documents is not red:
Do I need to specify it differently. If so, how?
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/seknqoe4?file=src%2Fapp%2Fpanelmenu-basic-demo.ts
Environment
PrimeNG 21.1.6
Angular 21
Angular version
21.1.0
PrimeNG version
v21
Node version
No response
Browser(s)
Firefox, Chrome
Steps to reproduce the behavior
- Go to https://stackblitz.com/edit/seknqoe4?file=src%2Fapp%2Fpanelmenu-basic-demo.ts
- You can see that the
Documents menu item is not red, even though it has style: {color: 'red !important'} applied
Expected behavior
The MenuItem styles should be applied
Describe the bug
The PanelMenu MenuItem has a
styleproperty for "Inline style of the menuitem". But, specifying styles using that property does not apply the styles.E.g.,
The
Documentsis not red:Do I need to specify it differently. If so, how?
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/seknqoe4?file=src%2Fapp%2Fpanelmenu-basic-demo.ts
Environment
PrimeNG 21.1.6
Angular 21
Angular version
21.1.0
PrimeNG version
v21
Node version
No response
Browser(s)
Firefox, Chrome
Steps to reproduce the behavior
Documentsmenu item is not red, even though it hasstyle: {color: 'red !important'}appliedExpected behavior
The MenuItem styles should be applied