Add an option which priors move transition than leave transition to `<transition-group>`
What problem does this feature solve?
When a child leaves, the children after that does not animate. Reproduction link
It does not animate even if leave transitions are not set. Reproduction link
Adding this feature will enable move transition when children are leaving.
What does the proposed API look like?
Add prefer-move-than-leave
prop which takes true
or false
.
The default is false
.
When it is false
, it will behave as now.
When it is true
, it will not do leave transitions but do move transitions.
Implemention
Add if (el._leaveCb) el._leaveCb()
here.
https://github.com/vuejs/vue-next/blob/03ae3006e1e678ade4377cd10d206e8f7b4ad0cb/packages/runtime-dom/src/components/TransitionGroup.ts#L149-L157
Seems like it is possible by using position: absolute
.