Skip to content

Is it possible to determine whether a v-if or v-show triggered the @leave event in a Vue Transition component? #12499

Answered by ujamX
rick-hup asked this question in Help/Questions
Discussion options

You must be logged in to vote

apologize for the confusion.
Both v-if and v-show trigger leave transition events.
As you said v-if removes the element from the DOM.
v-show sets the element's display to none.

After an event is fired, wouldn't it be nice to know if the event was fired by checking whether the element remains in the DOM?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rick-hup
Comment options

@ujamX
Comment options

Answer selected by rick-hup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants