-
Notifications
You must be signed in to change notification settings - Fork 376
Bug with multiple ContextMenu #82
Comments
Same error here. I tried to add context menu to each component rendered in a list. List items are members of an array each reached by map method. When I add context menu to each component in a scrollable list, it is displayed properly, but the on click event never gets triggered. I managed to get to the click event by using li or p tags inside MenuItem tags and calling onMouseDown event. Only problem is that I can't pass props from underlying component which triggered the event to an event handler. |
@valentinvichnal Seems your This is my code:
Hope it will solve your peoblem :) |
@yeze322 thanks for giving a work-around. @MladenKobiljski I'll take a closer look at this issue later this week. |
@MladenKobiljski is your code similar to this example? |
It is similar, and I managed to overcome an issue by adding dinamically unique id for each item in list. |
@yeze322 Thank you, I missed that, it solved one of my problem! |
@yeze322 thanks - obvious now I see the answer! |
Hi, great library!
If I use it on a single component it works well, but when I try to give this context for many components based on an array, it won't work.
If I try
<ContextMenu id='menu-delete'
for every component it will show the context menu on click in the right place, but
the onClick inside the MenuItem never gets called.
After I tried to use unique id for all:
<ContextMenu id={'menu-delete' + id}>
But without any luck, the onClick never triggered, and in this one the context menu sometimes appeared in a different component.
I use the latest 2.3.0 version.
The text was updated successfully, but these errors were encountered: