Closed jktravis closed 6 years ago
Hello @jktravis,
The others working ContextMenu
uses the same setup? (react-dnd, different route)
Pretty close. There are a few that are not on a virtualized grid. Other than that, yeah. This one takes three grids and kind of stitches them together to give a header top, header left, and then the main grid.
I noticed though, that if I do the drag/drop action before right-clicking, it doesn’t seem to do it.
Found the problem! Apparently, the component I was loading the menu in is loading multiple times on the page, causing effectively, duplicate menus all with the same name.
Sorry to bother you with this.
Oh nice you found it!
Hi. I'm hoping you can help with this error. Somehow, it seems like the menu isn't be set in certain situations. I'm adding a context menu in a react-virtualized grid that needs drag and drop. The app has multiple routes provided by react-router. All this to say that I'm having trouble getting the error to occur in isolation.
The problem seems to be when I navigate to the page with this particular menu (other menus seem to be okay). The first right-click causes an error:
Clicking through the error, the browser complains about this section of code:
Stepping through the code, the menu does show up for an instant before it goes away.
What's also interesting is that if I load the page directly (that is, don't navigate to it through menus), right-click works fine.
Here's the component I'm wrapping.
Here's the context menu component
And here's the use of the menu.