diff --git a/src/components/IngredientAddBox.vue b/src/components/IngredientAddBox.vue
index 6b8e3e6..945ee64 100644
--- a/src/components/IngredientAddBox.vue
+++ b/src/components/IngredientAddBox.vue
@@ -2,7 +2,6 @@
diff --git a/src/components/IngredientLine.vue b/src/components/IngredientLine.vue
index 8f4d53a..a8e9098 100644
--- a/src/components/IngredientLine.vue
+++ b/src/components/IngredientLine.vue
@@ -17,17 +17,23 @@ import CompactParsedIngredient from './CompactParsedIngredient.vue';
export default {
props: {
ingredient: { type: Object },
- showExpanded: { type: Boolean, default: false }
},
events: ['update-ingredient', 'update-product-link'],
components: { CompactParsedIngredient },
data() {
return {
ingredientText: this.ingredient.line,
- productLink: this.ingredient.product?.product_link ?? "",
- showDetails: this.showExpanded
+ productLink: this.ingredient.product?.link ?? "",
};
},
+ watch: {
+ ingredient: {
+ handler: function (newIngredient) {
+ this.productLink = newIngredient.product?.link ?? "";
+ },
+ deep: true,
+ },
+ },
methods: {
updateIngredient() {
if (this.ingredientText != this.ingredient.line)