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

Implementation of basic context menu #258

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

meshalawy
Copy link

@meshalawy meshalawy commented Jul 1, 2019

Hi. Thank for the great widget. I had a use case where I needed a custom context menu when the user right-clicks on any cell, so I added an implementation of a basic context menu. The main idea is to define two callbacks:
1- items_callback: which will be called when the user right-clicks on a cell, and it should return a list of items (strings) to be shown in the context menu, based on the clicked cell.

2- click_callback: which will be called when the user clicks one of the menu items.

Ideas for the context menu were borrowed from example 7 of SlickGrid

@meshalawy meshalawy marked this pull request as ready for review July 1, 2019 18:28
meshalawy added 2 commits July 3, 2019 11:28
This matches the conventions used in qgrid
and avoid potential issues of index versus row_index.
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

Successfully merging this pull request may close these issues.

1 participant