Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent menu removing after clicking ? #62

Open
AlexisPister opened this issue Jul 13, 2021 · 1 comment
Open

Prevent menu removing after clicking ? #62

AlexisPister opened this issue Jul 13, 2021 · 1 comment

Comments

@AlexisPister
Copy link

AlexisPister commented Jul 13, 2021

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 AlexisPister changed the title Leave menu after clicking ? Prevent menu removing after clicking ? Jul 13, 2021
@patorjk
Copy link
Owner

patorjk commented Jul 14, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants