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
-
Is it possible to determine whether a v-if or v-show triggered the @Leave event in a Vue Transition component? |
Beta Was this translation helpful? Give feedback.
Answered by
ujamX
Dec 4, 2024
Replies: 1 comment 2 replies
-
HI, @rick-hup To verify this, you can check the logs to see if the transition event is being called normally. The @Leave event is fired when an element is removed from the DOM in a Vue transition. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?