Skip to content

computed property is not updated when its dependencies are binded with inline data #3836

@iraklisg

Description

@iraklisg

Vue.js version

2.0.1

Reproduction Link

https://jsfiddle.net/3xgv2e3n/2/

Steps to reproduce

Replace my_tasks in <task-list :tasks="my_tasks"></task-list> with an inline list e.g. [{body: 'Hello all', completed: false},{body: 'Goodbye all', completed: false}]

What is Expected?

It is expected the remaining computed property to be updated when user clicks on a task (i.e toggle its complete state from false to true and vice-versa), as it happens in case of binding the my_tasks data with tasks prop

What is actually happening?

The computed property is not re-evaluated when its dependency (i.e. task.completed ) changes.
Note that the JSfiddle code works fine with Vue 1.0.26, when replacing the my_tasks with an inline list [{/*...*/},{/*...*/}, /*...*/]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions