Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

V-tooltip: Close Popover from a method

Tags:

vue.js

vuejs2

In VueJS, I'm using v-tooltip (https://github.com/Akryum/v-tooltip) for popovers.

In order to close a popup, they provide a directive called 'v-close-popover' which I can assign to a button/link inside the popover to close the popup. This works well.

However, I have a requirement where I need to close this popup from a Vue method. But I dn't know how to trigger closing of the popover from the method.

like image 650
asanas Avatar asked Sep 09 '25 11:09

asanas


1 Answers

In case anybody else stumbles upon this issue, the v-popover component has a hide method. So if you were to place a ref on your popover component then you can access the hide method from it and call it :)

like image 176
olvenmage Avatar answered Sep 11 '25 12:09

olvenmage