Subscribe on changes!

Unnecessary move animation in nested <transition-group>

avatar
Feb 9th 2022

Version

3.2.30

Reproduction link

github.com

Steps to reproduce

npm run dev en : and click green or red button to change sort 中文 : 然后点击绿色或红色的按钮调整列表顺序

What is expected?

en : Only the outermost div has transition animation 中文 : 只有最外层的 div 有过渡动画

What is actually happening?

en : Inner div also has transition animation 中文 : 内部的 div 同样产生了过渡效果


en : i find add a css can fix this bug 中文 : 我发现添加一个 css 可以修复这个 bug

.scx-group-list-move .scx-group-list-move { transition: unset; }

avatar
Feb 9th 2022

I would not necessarily see this as a bug, it's a side effect of nesting the same transition into itself, combined with the fact that elements here seem to be recreated from the slot switch - that needs handling from the developer.

But we'll take a closer look