Open ammojamo opened 1 year ago
I also couldn't find this in the docs, so I looked for similar issues. I was able to make this work by using a ref
and calling the show
and hide
methods. I then expose the methods to the parent component
import { Tippy } from 'vue-tippy'
const tippyRef = ref<typeof Tippy | null>(null)
const showPopover = () => {
tippyRef.value?.show()
}
const hidePopover = () => {
tippyRef.value?.hide()
}
<tippy ref="tippyRef" trigger="manual">
...
</tippy>
I'm trying to get a tooltip to show/hide based on some boolean condition instead of on hover.
I see the docs say to pass
trigger: 'manual'
to programatically show/hide a tooltip, but I can't figure out how to actually show/hide it after passing that config.