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

feat: force context menu #396

Closed
wants to merge 1 commit into from

Conversation

1pone
Copy link
Contributor

@1pone 1pone commented Jan 23, 2024

With the release of onRenderContextMenu, users have the opportunity to define a variety of menus based on their needs, which may be more than just editing-related, and which are currently not presented when in readOnly mode.

@josdejong
Copy link
Owner

Thanks, good idea. Right now the context menu is simply not rendered when read only.

I was thinking. When a user sees this new property forceContextMenu, it may not be clear what it exactly is and that it is related to a combination of onRenderContextMenu and readOnly. Maybe we can instead extend onRenderContextMenu: always render it (also when readOnly), unless the function returns false for example. We can pass readOnly along with the context object (2nd argument). The default implementation of onRenderContextMenu can return false when readOnly is true to maintain the current behavior. What do you think?

@1pone
Copy link
Contributor Author

1pone commented Jan 26, 2024

You make a good point, the new property forceContextMenu introduced will make the logic more difficult to understand. Maybe I'll try the solution you're talking about.

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.

3 participants