Ember JS: collection view not rendered when content binding changes

1.6k Views Asked by At

Below is an example of my collection view which is supposed to generate a list of people

{{view Em.CollectionView itemViewClass="App.PersonView" contentBinding="App.PeopleController"}}

When I populate App.PeopleController the first time, this collection view renders fine. However, when I reset PeopleController and populate it again, the collection view does not render. Does anybody know why?

Updated:

Here's how I populate App.PeopleController

people.forEach(function(p) {
  _this.pushObject(App.Person.create(p));
})
1

There are 1 best solutions below

1
On

Did you reset PeopleController in the console and repopulate it in the console? You might need to trigger a new runloop to get the collection view to update.