Skip to content

vm.$watch on a specific property of objects in an array #1426

@tianhai82

Description

@tianhai82

Feature request.
It will be useful and efficient to watch on a specified property of objects in an array. For example,
...
data: {
users: [{id:1, name:"peter", age:16},{id:2, name:"John", age:18}]
}
...
vm.$watch('users.name',function(newVal, oldVal){
// newVal and oldVal should return the particular user which name changed
},{deep:false}
);

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