vue3-popper icon indicating copy to clipboard operation
vue3-popper copied to clipboard

[Question] Is there a way to use the manual :show option with automatic closing?

Open aadjemonkeyrock opened this issue 3 years ago • 3 comments

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?

aadjemonkeyrock avatar Dec 26 '21 11:12 aadjemonkeyrock

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.

valgeirb avatar Dec 26 '21 11:12 valgeirb

Great it has your attention, let me know if I can be of any assistance

aadjemonkeyrock avatar Dec 26 '21 12:12 aadjemonkeyrock

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.

fvanwijk avatar Jan 25 '22 11:01 fvanwijk