vkbansal / react-contextmenu

Project is no longer maintained
MIT License
1.4k stars 375 forks source link

SyntheticEvent warning when ContextMenuTrigger props.collect is a promise #292

Closed AndySu0216 closed 4 years ago

AndySu0216 commented 5 years ago

Hi,

When the ContextMenuTrigger props.collect is an promise, I got the following warning.

Warning: This synthetic event is reused for performance reasons. If you're seeing this, you're accessing the property `target` on a released/nullified synthetic event. This is set to null. If you must keep the original synthetic event around, use event.persist().

This should be thrown at https://github.com/vkbansal/react-contextmenu/blob/20667791413b234ad089a7a1ccad0d94469401f1/src/ContextMenuTrigger.js#L136

How can I fix this error?

Thanks!

Version

2.9.3

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.