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

Listen to changes in inner arrays #1

Open
rodikh opened this issue Jul 9, 2017 · 0 comments
Open

Listen to changes in inner arrays #1

rodikh opened this issue Jul 9, 2017 · 0 comments

Comments

@rodikh
Copy link
Owner

rodikh commented Jul 9, 2017

js-arrays listens to pushes and other changes on top-level properties of it's objects, but not on nested arrays.

let arr = [
    {"id":1, "members": ["abc", "def"]},
    {"id":2, "members": ["ghi", "jkl", "mno"]},
    {"id":3, "members": ["pqr", "stu"]}
];
arr[0].members.push("vwx")

Either add listeners to children or treat as out of scope.

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

No branches or pull requests

1 participant