fkhadra / react-contexify

👌 Add a context menu to your react app with ease
https://fkhadra.github.io/react-contexify/
MIT License
1.15k stars 117 forks source link

How to keep it open for styling purposes? #265

Open mrpsiho opened 4 months ago

mrpsiho commented 4 months ago

On this page https://fkhadra.github.io/react-contexify/theme-builder the menu always visible. How could I achieve the same? Is it a prop I have to use or any other way? The thing is I am using custom items and I need to use devtools to inspect and styles them. But when I try using devtools - the menu is getting closed. How to keep it opened?

SethReloaded commented 2 months ago

I've run into the same issue. You can just add a "onVisibilityChange" event handler to your Menu and set a breakpoint in your eventhandler. The event is fired before the element disappears, therefore you can inspect the item then. Although a bit clunky, this worked for me. Don't now if this is still relevant though :)