I have a page where I display a table from DS model and I have the option to remove or add.
It works perfectly.
The issue I’m running into is, when I put this on a route (resource ‘client’ has header and some controls and route is under resource) it doesn’t work. For instance, I have multiple routes under the same resource.
So on client.index I display the model and I have a delete button which fires properly on the REST and actually deletes the record (I’m using destroyRecord()). The problem is that is not updated on the table. Same happens when I add a new record. If I refresh the page the data is there but no changes are visible until I refresh.
I tried creating a jsbin with an example, but it only happens with the REST adapter.
Is there anything special I have to do for this kind of case? Perhaps access the data differently?
{{#each filteredContent}}
{{! bind to filteredContent instead on your table }}
{{/each}}
Same happens when I add a new record.
This is the part that confuses me, can you post an example in a jsfiddle or something isolating the issue. It seems data-binding is entirely broken, which may be due to malformed html breaking the databinding.
I think I forgot to mention something.
When I press the add or remove button, a modal is displayed, and so the action is handle on that modal controller.
For example, this is the action to remove the client:
In case someone else runs into this, we worked offline to solve this. xBlack was using arrangedContent on an ArrayController and not observing model.@each.isDeleted so arrangedContent would not refire the computed when xBlack destroyed the record.