lundi 8 juillet 2019

EmberJS Mirage Dependent attributes do not update on patch

I have declared a properties in a Mirage factory as below and using Dependent attributes as found in the docs.

price() {
  return faker.finance.amount(100000, null, 0);
},

priceDisplay() {
  return '$' + this.price;
}

When I do a patch to update price I expect priceDisplay to update as well like a computed property however this is not the case.

Does anyone know if this is possible or is this a Mirage limitation?




Aucun commentaire:

Enregistrer un commentaire