mercredi 30 septembre 2015

observers do not fire when I set computed.reads() value to null

I have the following

_selection: computed.reads('selection'),

_selectionUpdated: Ember.observer('_selection', function() {
    //Do something
})

When I do the following, _selectionUpdated is called correctly

this.set('_selection', someObject);

However, when I do

this.set('_selection', null);

_selectionUpdated does not fire, any ideas why?




Aucun commentaire:

Enregistrer un commentaire