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

Monkeys do not trigger parent updates when they update #437

Open
dumconstantin opened this issue Jan 26, 2016 · 0 comments
Open

Monkeys do not trigger parent updates when they update #437

dumconstantin opened this issue Jan 26, 2016 · 0 comments

Comments

@dumconstantin
Copy link

When a monkey is updated it does not dispatch an update event to its parent:

let tree = new Baobab({
  a: {
    b: 10,
    c: monkey(['foo'], x => x)
 },
 foo: 20
})
tree.select('a').on('update', () => console.log('updated a'))
tree.select('a', 'c').on('update', () => console.log('updated monkey'))

tree.select('foo').set(123); 
// updated monkey
// BUT does not trigger "update a" on the parent

// on the other hand
tree.select('a', 'b').set(123);
// updated a

Is there a possibility to make a monkey trigger a parent update?

(I'm using 2.3.0)

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