Skip to content
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

Changing any data causes a component added in a v-for loop with a slot to rerender #12082

Closed
nomve opened this issue May 18, 2021 · 4 comments
Closed

Comments

@nomve
Copy link

nomve commented May 18, 2021

Version

2.6.11

Reproduction link

https://jsfiddle.net/n5o7k09L/

Steps to reproduce

  1. add 1 or more child components with v-for
  2. have the child component accept a slot and add some content to it
  3. update some data that is unrelated to the child component

What is expected?

I would expect the child component to not update. It is in fact not updating if there is slotted content or the component is added with a v-for loop, but if both of those things are true, it will update

What is actually happening?

The component updates/rerenders.


I don't know if this is in fact a bug or just a limitation, but I could not find any reference to this behavior in the docs or anywhere else.

@posva
Copy link
Member

posva commented May 18, 2021

This has been fixed but not released yet

@posva posva closed this as completed May 18, 2021
@nomve
Copy link
Author

nomve commented May 18, 2021

thanks 👍

@VFertak
Copy link

VFertak commented May 18, 2021

@posva thanks! which release will contain the fix?

@dodoto
Copy link

dodoto commented Nov 26, 2021

you can add functional to template in SFC, and it will not rerender.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants