samedi 18 mars 2017

Ember 2.11, Data passed between parent to child components.

I have a parent and a child components such that child component have few radio button options which appears based on a checkbox( defined in parent component). I pass the checkbox as a mutable variable to child component. The groupValue of the radio button changes based on the computed property dependent on checkbox in the child component. Now to my surprise, when the init() method of a child component is called, the computed property is trigged. If I change the value of the radio button and change my checkbox, the computed property is not trigged.

So my question is once a mut data is passed from parent to child component, can't a parent changing that data wouldn't trigger child component computed property?




Aucun commentaire:

Enregistrer un commentaire