Deeply nested properties do not trigger template getter on rollback
See original GitHub issueVersion
2.0.0
Test Case
https://github.com/neighborly/changeset-test
Steps to reproduce
We are building a generalized form component based on ember-changeset that yields a set of input fields that are automatically bound to the changeset by a fieldName property. The value of these inputs is bound by a template getter to the this.fieldName property within the changeset, and onInput is bound to action (changeset-set this.changeSet this.fieldName) value="target.value". The changeset picks-up on the changes to the input; however, when the form is reset, the changes clear from the changeset, but the inputs do not reset their values.
It seems like the {{get}} helper only binds to the first token in a complex property key. This does not happen on properties that are at the top-level of the changeset model. For example, this will occur on a name.first property, but not on a email property.
Here is a demo app that illustrates the idea: https://github.com/neighborly/changeset-test
In this demo app change both of the values in the inputs, and click the reset button. You will only see the email field reset.
Expected Behavior
Expected behavior is that any property would update when reset.
Actual Behavior
Actual behavior is that the deeply nested properties do not update when reset.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8

Top Related StackOverflow Question
That’s the solution
hey, using latest 2.1.2 with
{{changeset-get}}and having same issue where a nested key isn’t being updated after it’s changed.e.g.
new Changeset({ params: { query: '' }}),<input value={{changeset-get changeset "params.query"}}>If I mutate the value of changeset.get(‘params.query’), the input in the template will not update. Any ideas?also here is a way to spy on a dynamic dependent key in: