Fix ingredients not refreshed upon recipe change (#343)

This commit is contained in:
sephrat
2021-04-23 08:15:25 +02:00
committed by GitHub
parent 8e4b951ecc
commit df1bca6c6a

View File

@@ -37,16 +37,13 @@ export default {
props: { props: {
ingredients: Array, ingredients: Array,
}, },
data() { computed: {
return { displayIngredients() {
displayIngredients: [], return this.ingredients.map(x => ({
}; text: x,
}, checked: false,
mounted() { }));
this.displayIngredients = this.ingredients.map(x => ({ },
text: x,
checked: false,
}));
}, },
methods: { methods: {
generateKey(item, index) { generateKey(item, index) {