You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I right click, I get Uncaught TypeError: t is undefined - full stack below.
My code is:
constMENU_ID='MyMenu'constMyThing=({....})=>{const{ show }=useContextMenu({id: MENU_ID,});
...
functionhandleItemClick({ event, props, triggerEvent, data }){console.log(event,props,triggerEvent,data);}return(<div>
...
<Menuid={MENU_ID}><ItemonClick={handleItemClick}>One</Item><ItemonClick={handleItemClick}>Two</Item></Menu><divonContextMenu={show}><p>some stuff here</p></div>
...
</div>)}
When I right click I get this in console:
22:08:38.790 Uncaught TypeError: t is undefined
show bundle.js:68203
show bundle.js:68216
React 14
unstable_runWithPriority scheduler.development.js:468
React 15
js index.js:7
factory react refresh:6
Webpack 3
2 bundle.js:68203:5
show bundle.js:68203
show bundle.js:68216
React 14
unstable_runWithPriority scheduler.development.js:468
React 8
forEach self-hosted:4425
React 7
js index.js:7
factory react refresh:6
Webpack 3
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:
This seems to be fixed by changing onContextMenu={show} to onContextMenu={(e) => show({event: e})} which I got from the v6-changes page. The tutorial should probably be updated.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When I right click, I get
Uncaught TypeError: t is undefined
- full stack below.My code is:
When I right click I get this in console:
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:
Sure, though I get a slightly different stack trace (
X is not a function
) on CodeSandbox: https://codesandbox.io/s/react-contexify-issue-255-t6fthrWhat is the expected behavior?
It doesn't fail.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Firefox 117 (Linux), CodeSandbox.
React 17.0.2, Contexify 6.0.0
The text was updated successfully, but these errors were encountered: