-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
fix(Transition): handle KeepAlive child unmount in Transition out-in mode #11778
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
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-sfc
@vue/compiler-dom
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-dom
@vue/runtime-core
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
| ) | ||
| } | ||
| root.transition = vnode.transition | ||
| root.transition = isMounted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line fixes #10827
| if (!(instance.job.flags! & SchedulerJobFlags.DISPOSED)) { | ||
| instance.update() | ||
| } | ||
| delete leavingHooks.afterLeave |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line fixes problem 1
|
|
||
| if (!slots.default) { | ||
| return null | ||
| return (current = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line fixes problem 2, but it will lead to #10827 regression.
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
close #11775
Problems in #11775
The out-in animation fails when switching from
pctopa.pbandpcwill be unmounted. It is expected that only theafterLeaveofpcwill be executed, but theafterLeaveofpbis also being executed, causingpato be rendered twice and resulting in the animation not working as expected. (TheafterLeaveofpbshould not be executed again)afterLeaveshould be destroyed after performed.pcwas removed frominclude, but it was not unmounted.currentis stillpcinpruneCacheEntry, so failed to unmountpc.currenttonullwhen patchingemptyPlaceholder.Problem in #10827
While fixing problem 2, I recalled a previous bug, #10827. At that time, it was determined that #10632 caused it, so #10632 was reverted, and the issues related to #10632 were re-fixed. Fixing problem 2 is equivalent to bringing #10632 back, so bug #10827 needs to be re-investigated.
Minimal reproduction
Steps to reproduce
switchToBbuttonswitchToAbuttonWhen switching from
CompBtoCompA, the content inCompAdisappears.afterLeavenot to perform.component.subTree.Thanks to @hooray for providing the reproduction