-
-
Notifications
You must be signed in to change notification settings - Fork 262
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
Split ContextMenu into ContextMenuInner subcomponent #622
base: master
Are you sure you want to change the base?
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/carbon-svelte/carbon-components-svelte/HGdrjrhuNVnNwX63mSVKUHTABUVS |
Any chance of resolving the conflicts? |
I tried just using the ContextMenuInner on it's own and I get this error, which I can't interpret:
|
I would consider calling it ElementContextMenu. As when it is used in isolation without the Global it is not I also notice that if it is used without the Global, right-click outside of the context menu does not close it. This is undesirable. I had a go at fixing it but couldn't figure out how @NyxCode |
e7485c4
to
417102d
Compare
See #620
This PR extracts most functionality of
ContextMenu
toContextMenuInner
, except event handling.The functionality of
ContextMenu
should be unaffected by this.ContextMenuInner
can now be used when listening foron:contextmenu
onwindow
is undesirable. In the documentation, I added an example for binding the context menu to only a single element.I'm pretty new to svelte & this library, so please thoroughly review my changes.