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

fix issues 1980 and 2003 #2057

Merged
merged 2 commits into from
Jul 25, 2019
Merged

fix issues 1980 and 2003 #2057

merged 2 commits into from
Jul 25, 2019

Conversation

haimrait
Copy link
Contributor

@haimrait haimrait commented Jul 25, 2019

Fix issues #1980 and #2003.

Add changelog for fixes 1980 and 2003 issues.
@mweststrate
Copy link
Member

Great PR, thanks!

@danielkcz
Copy link
Contributor

I guess no need to hold it longer here since you got approval from the highest authority :)

Can you also prepare PR to mobx4-master branch, please?

@urugator
Copy link
Collaborator

Thanks for the PR! I see it's based on the snippet I posted, but you removed the part which was supposed to notify observers when only the order is changed. A situation like this:

const map = observable.map({ a: "a", b: "b" });
autorun(() => map.entries());
map.replace({ b: "b", a: "a" }); // should invoke autorun

Is it handled correctly? Do we have a test for that?

@haimrait
Copy link
Contributor Author

Yea... I checked this issue and it invokes autorun one time for your case.

@haimrait
Copy link
Contributor Author

@FredyC I made a pr for mobx4- master branch
#2058

@urugator
Copy link
Collaborator

urugator commented Jul 25, 2019

Yea... I checked this issue and it invokes autorun one time for your case.

Interesting... I wonder what invalidates the reaction then ... this.delete isn't called and this.set shouldn't since the value isn't modified (or keys)...

@danielkcz
Copy link
Contributor

@mweststrate I see you are on issue spree but don't publish V5 right now. Chances are it's actually broken, see #2058

@mweststrate
Copy link
Member

mweststrate commented Jul 26, 2019 via email

danielkcz pushed a commit that referenced this pull request Jul 27, 2019
danielkcz pushed a commit that referenced this pull request Jul 27, 2019
alexeygt pushed a commit to alexeygt/mobx that referenced this pull request Aug 15, 2019
* fix issues 1980 and 2003

* Update CHANGELOG.md

Add changelog for fixes 1980 and 2003 issues.
alexeygt pushed a commit to alexeygt/mobx that referenced this pull request Aug 15, 2019
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

Successfully merging this pull request may close these issues.

None yet

4 participants