I have a select box, its values are computed in the controller via populateSelectArray
. I want to recalculate this array every time an item is deleted from store.
var Store = Ember.Object.extend(Ember.Evented, {
deleteRecord: function (record) {
console.log('deleteRecord triggering', record.get('typeName'));
this.trigger('updates:' + record.get('typeName'), null);
console.log('here');
//actual delete
},
});
controller:
this.get('store').on('updates:someType', this.populateSelecArray);
When deleting items populateSelectArray
is called, but the item is not deleted, here
does not appear on console. How can I both call populateSelectArray
and delete the record?
I am new to both Ember.js and Javascript, so my question may be trivial.
Aucun commentaire:
Enregistrer un commentaire