Skip to content

$refs in loops are not in sync - the sub components instances do not get updated #3204

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

Closed
GianlucaGuarini opened this issue Jul 1, 2016 · 4 comments
Assignees

Comments

@GianlucaGuarini
Copy link

GianlucaGuarini commented Jul 1, 2016

Vue.js version

1.0.26

Reproduction Link

http://jsfiddle.net/e2zfe3se/

Steps to reproduce

Check the above example

What is Expected?

The $ref object should be updated using the new sub components instances

What is actually happening?

The $ref object caches the old components instances and all the references to the new DOM elements created get lost

@johnleider
Copy link
Contributor

After some digging it happens during the unbuild process. It is called with defer of undefined. If the refs are unbound with deferred true, it stops that from happening.

@LinusBorg
Copy link
Member

can you share the location of the problem in src?

@yyx990803 yyx990803 added the bug label Jul 2, 2016
@johnleider
Copy link
Contributor

Sorry, not sure why I didn't before. src/directives/internal/component.js, line 287 "child.$destroy(false, defer)".

@kazupon kazupon self-assigned this Jul 3, 2016
kazupon added a commit to kazupon/vue that referenced this issue Jul 3, 2016
yyx990803 pushed a commit that referenced this issue Jul 5, 2016
@kazupon
Copy link
Member

kazupon commented Jul 6, 2016

Close (Fixed in #3217)

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

No branches or pull requests

5 participants