dimanche 25 septembre 2016

How to observe store collection

I have code for generate checkboxes list:

  accountsCheckboxes: Ember.computed('accountsCheckboxes.@each', function(){
  return this.model.accounts.map(row => {
    return {
      label: row.get('name'),
      value: row.get('id')
    };
  })
}),

but after modify accounts collection, add or remove, this computed property doesnt refresh. I tried find how to do it with events, or how to observe store collection, but without success. I modyfy this model collection in others controllers.




Aucun commentaire:

Enregistrer un commentaire