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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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