Skip to content

v-for not triggering detach on children #1440

@tgeorgiev

Description

@tgeorgiev

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions