vue-js-popover
vue-js-popover copied to clipboard
No transitions on leave
It seems only enter transitions are supported - the popover element is removed from the DOM before .v-leave-active, .v-leave-to etc are applied.
Yeah, i will be happy to review a PR if you will fix it.
Okay I will see what I can do
Has anyone found a solution to this?
No sorry @mclassdesigns
I was looking into adding the transitions to the render function instead. Will report back.
I have found a solution that works. In Popover.vue, nest the original div inside a transition wrapper component, passing the name of the transition as a prop:
return createElement(
Vue.options.components['Transition'],
{ props: { name: 'show-from-bottom' } },
[
createElement(
'div',
{
class: this.className,
style: this.style,
attrs: {
'data-popover': this.name
},
on: {
click (event) {
event.stopPropagation()
}
},
ref: 'dropdown'
},
this.$slots.default
)
]
)