-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
fix(teleport): ensure descendent component would be unmounted correctly #6529
Conversation
!!child.dynamicChildren | ||
) | ||
} | ||
// an unmounted teleport should always unmount its children whether it's disabled or not |
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 will be a breaking change.
misunderstood.
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.
The original comment was added in #2870. And it refered to remove
but not unmount
.
When it comes to remove
, there is indeed no need to remove its children when it's disabled and doRmove
is false.
But unmount
is not equal to remove
. We can unmount a child without remove it, by making doRemove
false.
While unmounting a component, we should also unmount its children. If not, its children would never be unmounted, and will cause the bug this pr fixes.
@edison1105 do you know if this PR could be merged sometime soon? |
Sry Im not sure. |
Size ReportBundles
Usages
|
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
Hello, has this submission been published yet? If not, when is it planned to be released? |
@Joshua-Leee It's released in v3.3.6. |
fix #6347
This pr makes 2 change.
doRemove || !isTeleportDisabled(props)
is false, would unmount children withdoRemove
arg being false, instead of doing nothing.doRemove
is false but!isTeleportDisabled(props)
is true, would not executehostRemove(anchor!)
any more.