vendredi 21 août 2020

Ember.JS force computed property to recalculate

So I have a computed property in my Ember application. Declared as myComProp: computed('itemTrait', function () {...}). myComProp belongs to an item model. In a separate component (listItem) I have a property that is an alias of myComProp: myAlias: alias('itemModel.myComProp'). Now listItems are a member of an array of listItems, with its properties being rendered in the web app.

Now by the property being an alias, is there a way to force the computed property to recompute?

I have tried making the alias a tracked property but doing so returns the call stack as a string, not the actual result of the computed function.




Aucun commentaire:

Enregistrer un commentaire