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

set method support set object value by path #6

Closed
Javey opened this issue Jul 26, 2018 · 1 comment
Closed

set method support set object value by path #6

Javey opened this issue Jul 26, 2018 · 1 comment

Comments

@Javey
Copy link
Owner

Javey commented Jul 26, 2018

The set method should support set object type value by path like bellow:

this.set({'a.b': 1, 'a.c': '2'}, {path: true});
// trigger $change:a.b $change:a.c $change:a $change $changed:a.b $changed:a.c $changed:a $changed
this.get('a') // {b: 1, c: '2'}
@Javey
Copy link
Owner Author

Javey commented Aug 1, 2018

The behavior is default, pass path: true is unnecessary.

this.set({'a.b': 1, 'a.c': '2'});
// trigger $change:a.b $change:a.c $change:a $change $changed:a.b $changed:a.c $changed:a $changed
this.get('a') // {b: 1, c: '2'}

@Javey Javey closed this as completed in 6e03b37 Aug 9, 2018
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