backbone.epoxy
backbone.epoxy copied to clipboard
Epoxy.Model({ coll: new Collection() computed: deps: ["coll"] ... Does not trigger update
This code for example:
overview = Epoxy.Model.extend({
defaults: {
accounts: new accCollection(),
},
computeds: {
deps: ["accounts"],
totalAccounts: function() {
return this.get("accounts").length;
},
},
});
Does not trigger computeds to recompute when a member is added to the collection via .add.
If accounts: [], everything works great, appending an element triggers computeds to recompute.