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

Add ability to get only the changed data in createViewModel #171

Closed
ItamarShDev opened this issue Feb 3, 2019 · 8 comments
Closed

Add ability to get only the changed data in createViewModel #171

ItamarShDev opened this issue Feb 3, 2019 · 8 comments

Comments

@ItamarShDev
Copy link
Member

Currently, according to docs, createViewModel has only isPropertyDirty(propName)

Is it possible to add an option to get all changed props (hopefully with the data)

looking at

this.localValues.set(key, value)

we can just open an option to get localValues back.

ItamarShDev added a commit to ItamarShDev/mobx-utils that referenced this issue Feb 6, 2019
@apsavin
Copy link

apsavin commented Feb 20, 2019

Looks like we need #173 if we want this to work correctly

@ItamarShDev
Copy link
Member Author

@apsavin why? these two seems unrelated really, am I missing something?

ItamarShDev added a commit to ItamarShDev/mobx-utils that referenced this issue Feb 20, 2019
@apsavin
Copy link

apsavin commented Feb 20, 2019

I suppose that a programmer would expect that changedValues contains only values that differ from model.

@ItamarShDev
Copy link
Member Author

Oh, I see.
You are correct, will look into it

ItamarShDev added a commit to ItamarShDev/mobx-utils that referenced this issue Feb 20, 2019
@ItamarShDev
Copy link
Member Author

@apsavin added fix to PR :)

@apsavin
Copy link

apsavin commented Feb 20, 2019

LGTM, thanks!

@ItamarShDev
Copy link
Member Author

fixed in #172
closing

@mweststrate
Copy link
Member

Released as 5.2.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

3 participants