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

Lists do not bubble expando properties like maps do #28

Open
justinbmeyer opened this issue Feb 11, 2017 · 0 comments
Open

Lists do not bubble expando properties like maps do #28

justinbmeyer opened this issue Feb 11, 2017 · 0 comments

Comments

@justinbmeyer
Copy link
Contributor

Because lists lack a bubbleRule like https://github.com/canjs/can-map/blob/master/can-map.js#L123

They do not bubble expando events as shown here: http://jsbin.com/wigazun/edit?js,output

const Item = can.Model.extend();

const items = Item.models({
  data: [{}],
  meta: {
    foo: 'bar'
  }
});

items.bind('meta.foo', (ev, val, old) => console.log(`foo changed to ${val} from ${old}`));
items.attr('meta.foo', 'baz');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant