Hi Anthony,
Greetings from Syncfusion support.
Based on the shared sample, we were able to replicate the reported 'Duplicate menu items when the menu is opened more than once' issue while running the sample on our end.
Refer to the below code snippets.
[app.component.ts]
...
@Component({ imports: [MenuModule, ButtonModule],
standalone: true, selector: 'app-root', template: `<div class="e-section-control"> <div class="control-section"> <div class="menu-section"> <ejs-menu #menu [items]='menuItems' (beforeOpen)='beforeOpen($event)' (created)='created()' (beforeClose)="beforeClose($event)"></ejs-menu> </div> </div> </div>`, }) export class AppComponent { @ViewChild('menu') public menuObj?: MenuComponent; ... public beforeClose(args: any) { this.menuObj?.removeItems(['dynamic-1', 'dynamic-2'], true); } }
... |
For your reference, we have attached the sample.
Check out the attached sample and let us know if you need any further assistance.
Regards,
Prasanth Madhaiyan.