Skip to content

Commit

Permalink
Merge pull request #15042 from primefaces/issue-14893
Browse files Browse the repository at this point in the history
Fixed #14893 - PanelMenu | Refactor to trigger change detection in su…
  • Loading branch information
cetincakiroglu committed Mar 13, 2024
2 parents 9b0518e + 3d03fc2 commit 13fbaf3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/components/panelmenu/panelmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ export class PanelMenuList implements OnChanges {
<div class="p-panelmenu-content" [attr.data-pc-section]="'menucontent'">
<p-panelMenuList
[panelId]="getPanelId(i, item)"
[items]="getItemProp(item, 'items')"
[items]="getItems(item)"
[itemTemplate]="itemTemplate"
[transitionOptions]="transitionOptions"
[root]="true"
Expand Down Expand Up @@ -942,6 +942,10 @@ export class PanelMenu implements AfterContentInit {
return item ? ObjectUtils.getItemValue(item[name]) : undefined;
}

getItems(item) {
return item ? [...ObjectUtils.getItemValue(item['items'])] : undefined;
}

getItemLabel(item) {
return this.getItemProp(item, 'label');
}
Expand Down

0 comments on commit 13fbaf3

Please sign in to comment.