-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
prop of component, in conditionally rendered slot, stops being reactive #7975
Comments
I have tried to find the difference between v2.5.13 and v2.5.14, finally find these commits 956756b may cause this bug. |
I think the problem here is that you have the same slot twice in your template. I modified your jsfiddle to show that conditional rendering of slots works as expected. https://jsfiddle.net/5kcdcpr6/2/ Version 2.5.13 works as described. |
As a workaround, you can attach the slot attribute to a |
The on-demand clone strategy introduced in 956756b mutates the owner array of the cloned vnode. This causes the newly cloned vnode to be destroyed when the parent node is destroyed. This is fixed by cloning the children array when cloning a vnode. fix vuejs#7975
The on-demand clone strategy introduced in 956756b mutates the owner array of the cloned vnode. This causes the newly cloned vnode to be destroyed when the parent node is destroyed. This is fixed by cloning the children array when cloning a vnode. fix vuejs#7975
Version
2.5.14+
Reproduction link
https://jsfiddle.net/cLdbL2t2/22/
Steps to reproduce
Clicking "update message" button adds dots after message.
Once "alter" button is clicked, the message is no longer updated.
What is expected?
Updating message continues working even after slot is altered.
What is actually happening?
Prop value stops being reactive, without error nor warning.
This behavior takes place after v2.5.14 including v2.5.17-beta.0.
Any version 2.5.13 and lower works as expected.
Unit test can be found in my github https://github.com/honeroku/vue-slot-investigate
I am understanding this is edge case and refactoring structure to avoid placing identical slot in conditional positions resolves my problem.
However, this behavior was not occurring in older versions and suddenly changed without error or warning,
so I am considering this is a bug and reporting to let you know.
The text was updated successfully, but these errors were encountered: