vue3-popper
vue3-popper copied to clipboard
[Question] Is there a way to use the manual :show option with automatic closing?
The Popper is nice, simple and works well. However I'm now using it in a project that requires manual opening of the Popper while retaining the automatic closing (especially the click outside) functionality.
When I use the sample code for manually opening the click out side doesn't work anymore. Reviewing your code showed that using the 'show' flag puts the component in manual mode. I tried to trick by setting the show = null in the onOpen event, but that results in a lot of warnings on the onMount and onBeforeMount.
TLDR: Can I retain automatic closing with manual showing?
This is related to #43, I need to look into refactoring so that you can have both manual and dynamic modes at the same time.
Great it has your attention, let me know if I can be of any assistance
I came here to create the same issue.
I looked into the src code and it would already help if you export useClickAway so that we can close the popper manually.
Else we have to implement (fork/copy) this behavior ourselves.