d3-context-menu icon indicating copy to clipboard operation
d3-context-menu copied to clipboard

Prevent menu removing after clicking ?

Open AlexisPister opened this issue 3 years ago • 1 comments

Hello,

Is it possible to call some function to prevent the menu disappearing after clicking on it ? I would like to add checkboxes to the menu but right now the menu window is closing after any click.

Thanks

AlexisPister avatar Jul 13 '21 11:07 AlexisPister

You should be able to do this by not having an "action" on the item:

https://github.com/patorjk/d3-context-menu/blob/master/js/d3-context-menu.js#L228

Outside of that, an additional option would be needed to prevent the menu from closing on click.

patorjk avatar Jul 14 '21 14:07 patorjk