I am testing my application, so I am doing the following:
- I show an index view (
#/locators/index), ofLocatorobjects, which I initially load withApp.Locator.find(); - I modify the backend manually
- Manually (with a button/action) I trigger a refresh of the data in the ember frontend, without changing the route. I do this with
App.Locator.find().then(function(recordArray) {recordArray.update();});. I see via console logging that a list request is sent to the backend, and that the up-to-date data is received. I assume this is used to update the store. - BUT: The view does not update itself to show this new data
Why does the view not get automatically updated when the store receives new data? Isn't that the whole point of the data binding in Ember?
If I now do the following:
- Open any other route
- Go back to the locators index route (
#/locators/index) - Ember sends a new request to list the locators
- The index view is shown, with the correct data (since it was already in the store?)
- New data is received
(I am not 100% sure that 4 and 5 happen in that order, but I am quite certain)
So, my impression is that the data is properly updated in the store, but that somehow a full re-rendering of the view is needed to display this new data, for example by leaving and re-entering the route. Is this true? Can I force this re-rendering programmatically?