Open PVSAmulya opened 2 years ago
@PVSAmulya I pulled down your repo and removing the computeds fixes the issue. There is some lack of compatibility between Ember's old push based vs today's pull based reactivity. We did add the dependentKeyCompat
. However, I took a brief look at ember-changeset and validated-changeset and unsure why exactly it isn't working for isDirty
or isValid
.
I know this solution might not be feasible on a really large project. But generally native getters for many of the use cases would be preferred.
After updating
ember-changeset-validations
from 2.2.1 to 3.16.0, the computed properties that are dependent onchangeset.isDirty
are not updating whenchangeset.isDirty
changes. This doesn't appear to be an issue for the other computed properties. Properties on the changeset that contain modified values trigger computed properties as expected.Here is the project that recreates the issue.
isDirty/isPristine
computed properties do not get triggered. firstName property does get triggered as expected.Github Link: https://github.com/PVSAmulya/form-project
When using ember-changeset 3.15.0 with ember-changeset-validations 2.2.1
changeset.isDirty
computed property works as expected. I debugged this issue to validated-changeset.There was a similar issue in ember-changeset for
isValid/isInvalid
that has been resolved. https://github.com/poteto/ember-changeset/issues/455Specific comment that is related to
isDirty
andisPristine
on the PR that resolves the above issue. https://github.com/poteto/ember-changeset/pull/509#issuecomment-644344152