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

v-for not triggering detach on children #1440

Closed
tgeorgiev opened this issue Oct 17, 2015 · 1 comment
Closed

v-for not triggering detach on children #1440

tgeorgiev opened this issue Oct 17, 2015 · 1 comment
Labels

Comments

@tgeorgiev
Copy link

I am using 1.0.0-rc.1 and I think I found an issue with using v-for that repeats vue components and those vue components have hooks to detached.

You can see the following fiddle http://jsfiddle.net/maverix7/hw8onjow/ Observe the console for every addItem and removeItem I expect to see "attached" and "detached" in the console, however we can see only "attached".

I think the problem lies on when the v-for notifies the children, on the lines of https://github.com/yyx990803/vue/blob/3ff16df8087a53fbabb3dfd2bb694a75f9f34d08/src/directives/public/for.js#L149, the problem is that on the previous line the execution lead to removing the so following up when we iterate over the children to notify them, they are missing.

I am still very new to vue.js so I may be wrong. By the way, so far I really like it!

@tgeorgiev
Copy link
Author

Thanks for the quick response!

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

No branches or pull requests

2 participants