mardi 15 septembre 2015

computed.reads does not fire observers when the binding is null

I am able to pass a selection into a component

{{my-component selection=model.account }} 

In the component there is a oneWay binding to the selection

_selection: computed.reads('selection'),

I have an observer over _selection

  selectionUpdated: observer('_selection.id',function() {
    //Do something
  }),

When model.account is changed, the selectionUpdated method is called correctly, however, when model.account is set to null it does no fire!

Why is this?




Aucun commentaire:

Enregistrer un commentaire