Skip to content
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

PanelMenuSub: badge property not accessed properly in template #14956

Closed
onetwotreefourfivesix opened this issue Mar 6, 2024 · 1 comment
Closed
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@onetwotreefourfivesix
Copy link

onetwotreefourfivesix commented Mar 6, 2024

Describe the bug

When using the PanelMenu with multiple levels, the badge is only shown on the header level.

In the template for PanelMenuSub the property 'badge' is directly accessed on the processedItem object.

<span class="p-menuitem-badge" *ngIf="processedItem.badge" [ngClass]="getItemProp(processedItem, 'badgeStyleClass')">{{ getItemProp(processedItem, 'badge') }}</span>

But the processedItem has no explicit property badge. The property badge should be accessed like in PanelMenu:

<span class="p-menuitem-badge" *ngIf="getItemProp(item, 'badge')" [ngClass]="getItemProp(item, 'badgeStyleClass')">{{ getItemProp(item, 'badge') }}</span>

Environment

Windows

Reproducer

https://stackblitz.com/edit/github-pf4huw

Angular version

17.2.3

PrimeNG version

17.8.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v20.11.1

Browser(s)

No response

Steps to reproduce the behavior

Create PanelMenu with one PanelMenuSub.
Expand PanelMenu to show PanelMenuSub.
No badge is shown in PanelMenuSub.

Expected behavior

The badge is shown for every level of child items.

@onetwotreefourfivesix onetwotreefourfivesix added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 6, 2024
@mehmetcetin01140
Copy link
Contributor

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants