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

Changeset changes array is not cleared when no changes exist #585

Open
jeroen-hoekstra opened this issue Mar 22, 2021 · 1 comment
Open

Comments

@jeroen-hoekstra
Copy link

Version

3.13.2

Test Case

https://github.com/jeroen-hoekstra/ember-changeset-issue

Steps to reproduce

After updating ember-changeset from 3.12.0 to 3.13.2 we noticed a difference in change tracking. Not sure if this is intended behaviour. You can run my test case with both versions and check the logs.

Open de console and notice that on page load the changeset changes array is empty. Initialy the hidden property is false. Toggle the first toggle so the hidden property becomes true. We see that the changeset changes array now contains the change object. When toggling it again the changeset changes array should become empty again, as the hidden property becomes equal to it's initial value, which is false. This was the case with version 3.12.0 but with 3.13.2 the changeset changes array still contains the change object, but with it's value set to false.

Expected Behavior

Version 3.12

Screenshot from 2021-03-22 09-47-11

Actual Behavior

Version 3.13.2

Screenshot from 2021-03-22 09-49-36

@betocantu93
Copy link
Contributor

Here's a fix using #586 spike. It has a few issues to be solved over there, but... it proves(?) it fix this.

https://github.com/betocantu93/ember-changeset-issue

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

2 participants