-
-
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
When switching between two of the same components with slot using v-else, I get a render error #9534
Closed
cypressious opened this issue
Feb 20, 2019
· 1 comment
· Fixed by mariazevedo88/hash-generator-js#6, tghelere/valorize-vidas#3, tghelere/DeliVuery#15, tghelere/vue-tetris#1 or tghelere/dailymages#1
Closed
When switching between two of the same components with slot using v-else, I get a render error #9534
cypressious opened this issue
Feb 20, 2019
· 1 comment
· Fixed by mariazevedo88/hash-generator-js#6, tghelere/valorize-vidas#3, tghelere/DeliVuery#15, tghelere/vue-tetris#1 or tghelere/dailymages#1
Labels
Comments
Since you didn't key the two component instances, the same instance will be re-used, and that's fine in itself. But it seems that the optimizations for (scoped) slots that we introduced in 2.6 have an unwanted side-effect here, namely that also the scoped slot is re-used / cached when the instance is "switched". A workaround would be to add a |
This was referenced Aug 29, 2019
This was referenced Sep 22, 2019
Lostlover
pushed a commit
to Lostlover/vue
that referenced
this issue
Dec 10, 2019
This was referenced Jan 20, 2020
This was referenced Feb 6, 2020
This was referenced Feb 24, 2020
This was referenced Mar 4, 2020
This was referenced Apr 15, 2020
This was referenced May 4, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
2.6.6
Reproduction link
https://codesandbox.io/s/4l3wn6r3nx
Steps to reproduce
Check the checkbox to trigger the error
What is expected?
The value "2" should be rendered
What is actually happening?
and "1" is still being rendered.
I have two of the same components next to each other and switch between them using
v-else
.This used to work in earlier versions of Vue but in 2.6.6 I get this unexpected render error. It appears as if component 1 is being rendered with the properties of component 2.
The text was updated successfully, but these errors were encountered: