vkbansal / react-contextmenu

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

Disabling right clicks #305

Closed ads692 closed 4 years ago

ads692 commented 4 years ago

Hi I just started using this context menu and fits my work case. Thank you!

Just checking if there's a way to KEEP the long left clicks and DISABLE the right clicks instead? I want the right click to still trigger the operating system's context menu by default.

coderliush commented 4 years ago

@ads692 ContextMenuTrigger has a prop 'disable',i think you can set it to false by default and set it to true in the right clicks。It works for me,you can try it

ads692 commented 4 years ago

Thanks @coderliush . I was able to map the 'disable' prop to a boolean value and utilize it to enable/disable my right click functionality. Works like a charm :)