BlazorContextMenu icon indicating copy to clipboard operation
BlazorContextMenu copied to clipboard

"OnClick" actions not working in components

Open NickVogt29 opened this issue 2 years ago • 5 comments

If an attempt is made to use the context menu in a component, the "OnClick" actions are not executed.

NickVogt29 avatar Jun 21 '23 08:06 NickVogt29

@NickVogt29 Make sure your ContextMenuTrigger and ContextMenu have unique Id if you render components in loop. And then it works like a charm.

Lamps26 avatar Aug 25 '23 12:08 Lamps26

No it doesnt. I have ContextMenu.Id and coresponding ContextMenuTrigger.MenuId unique but it doenst work. I open the dev dools in browser and there is data-instance-id which is the same for every item in the list. Like first item on one page is the same as for first item on other page (and second item on one page has the same data-instance-id as second item on another page) - i think this may be the issue but i dont know how to fix it.

DavidNeuwirth1 avatar Oct 09 '23 07:10 DavidNeuwirth1