Teleport children don't trigger unmounted hook when teleport is disabled
Vue version
v3.2.47
Link to minimal reproduction
Steps to reproduce
Use <teleport>
component and add some components to it. Set the disabled
attribute to true
.
What is expected?
The child components should trigger the unmounted hook.
What is actually happening?
The child components don't trigger unmounted hook.
When the disabled attribute is set to false
the events trigger as expected.
System Info
No response
Any additional comments?
No response
Maybe it's intentional. I found this comment in the source code. https://github.com/vuejs/core/blob/98f1934811d8c8774cd01d18fa36ea3ec68a0a54/packages/runtime-core/src/components/Teleport.ts#L243
completed 4162311