I'm currently troubleshooting an issue within my accordion setup.
Here's the HTML:
<p-menu
#menu
[popup]="true"
[model]="menusMap[item.id]"
></p-menu>
<button
pButton
class="p-button-text"
icon="pi pi-ellipsis-h"
(click)="menu.toggle($event)"
></button>
In my TypeScript file, I have the following code:
menusMap: Record<string, MenuItem[]> = {};
e!: Event;
function(){
......
if (page.list) {
const items = page.list;
this.menusMap = {};
items .forEach((item) => {
this.menusMap[item.id] = this.createMenuList(item);
});
}
}
createMenuList(item: Items): MenuItem[] {
this.e.stopPropagation(); // Although used, it doesn't prevent accordion display as intended
return [
{
label: '',
icon: '',
command: () =>
this.router.navigate(/aaa)
}
];
}
The issue arises when clicking the action menu
. All I want is for the action menu to open without affecting the accordion. How can I achieve this?
https://i.sstatic.net/oCoyg.png https://i.sstatic.net/UOPDY.png