Nested properties not changing on new Changeset
See original GitHub issueVersion
"ember-changeset": "2.1.2"
Test Case
https://ember-twiddle.com/02df9b64f83f5f844a76d63dff4184d8?openFiles=controllers.application.js%2C
Steps to reproduce
- Create a changeset of an object
- Set the changeset to a new changeset on the fly
- Increment changeset fields
- Call .rollback()
Expected Behavior
- Clicking on selected button group changes the fields to the new changeset
- Increment nested fields (max & min) on button click
- Rollback fields on button click
Actual Behavior
- The
"results.max"&"results.min"field (using changeset-get helper) doesn’t change when creating new changeset - When new changeset created on click, the incrementNumber() & rollback() action stops working
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Deeply nested properties do not trigger template getter on ...
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({...
Read more >Change sets for nested stacks - AWS CloudFormation
Change sets for nested stacks is enabled by default in the CloudFormation console. For more information, see Creating a change set.
Read more >Update binding when nested object changes - wpf
I've found I am able to overcome this by either: Assigning a new object to _person (as in the commented out line) Removing...
Read more >An example of nested forms, nested changesets, and error ...
In this case, that means that Changeset. fetch_change(changeset, :service_gap) will return :error , indicating the user intends no changes to ...
Read more >Use Change Sets to deploy nested Public Groups
When you deploy public groups with a change set, any nested group structure is not retained in the target organization. Resolution.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I found a workaround yesterday by wrapping the changeset-get helpers in a component with an if statement around the components yield. The setupController() hook sets this field (rerenderComplete) to false and then the didRender() hook in the component sets it back to true.
Heres a demo of it https://ember-twiddle.com/bc8feb256ab0744bdf8b4e73cc31a5f0 @bartocc
I think there is some issue with the changeset-get helpers not rendering properly.
I think your twiddle crashes because your using the changeset template helpers in your
{{table-cell}}component on model.entries that hasn’t been set as a new changeset. By commenting out this code it works.