I am dealing with a dynamic transition for a slider element that moves left or right. Vue only allows me to have one transition, so I am using a dynamic transition property like this:
<transition v-bind:name="'slider-' + slideDirection">
This slider has enter and leave transitions that adjust based on the direction it's appearing or leaving to. Everything seems fine, but...
When the element meets the conditions to appear, the enter and enter-to transitions work correctly every time. However, the leave and leave-to transitions do not update if the direction is changed after the element has appeared.
You can see an example of this behavior in this fiddle: https://jsfiddle.net/nxLmdk9q/4/
Everything works in the example, except when you change directions, the element retains the previous direction animation for leave-to.
How can I resolve this issue?