New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow mode for transition-group #3974
Comments
When dealing with multiple "places for item", the notion of transition mode is unclear. Does |
I think it would mean that all removals happen before any additions. In my example it shows that the new item gets added before the existing one gets removed, so more items than intended appear at the same time. |
As @yyx990803 wrote in the changelog of version 2.1.7, you need to add Personally I created a Hope this will work for you guys. Jerome |
I think transition mode in group can be more complicated than simple "in-out" and "out-in". For example, sometimes you want the items to be out one by one, sometimes you want them to be out all together. |
I know thats just a workaround, but you could use the CSS transition-delay
e.g. .slider-item {
display: inline-block;
&.slider-enter-active,
&.slider-leave-active {
transition: opacity .3s;
}
&.slider-enter-active {
transition-delay: .5s;
}
&.slider-enter,
&.slider-leave-to {
opacity: 0;
}
} |
This is unlikely to happen due to the sheer complexity - it will likely introduce too much extra code for a relatively non-critical use case, and the behavior of the transition modes on multiple items can be vague and hard to define. Even if we were to implement it, we'd probably ship it as a separate plugin instead of as part of core. |
@NonPolynomial's workaround doesn't work well without |
I was able to achieve a satisfying result for my needs by using:
instead of the position trick |
I'm trying to build an Isotope Grid style component but I'm also running into some issues. Especially with leaving-elements blocking incoming elements which causes a jump after they left. Adding Also, there is some really interesting behavior if the Here is how it looks like with isotope Any ideas on how to solve it? |
Here's what I did so it doesn't take up space when it appears
|
The standalone demo repo https://github.com/rightaway/demo shows the issue. If you click the message1 button once and then click it again, the second message1 notification appears and then the first one disappears. This is what
mode=out-in
is meant to solve for thetransition
tag, but there's no equivalent fortransition-group
. It leads to a very unattractive transition effect.In this example I could use
transition mode="out-in"
instead oftransition-group
(in https://github.com/rightaway/demo/blob/master/src/Notify.vue#L3) except for the fact that if you click the message1 button and then the message2 button, Vue gives an error saying I need to usetransition-group
.The text was updated successfully, but these errors were encountered: