Based on the desserts-example from Vuetify, I have added a new object to implement one-to-many relations on a data table:
ingredients:
[
{
ingName: 'Yogurt',
amount: 100,
measure: 'gramm'
},
{
ingName: 'Ice',
amount: 50,
measure: 'ml'
}
]
The example is here: https://codepen.io/rasenkantenstein/pen/MWYEvzK
I am having trouble to add a new or edit a given ingredient. I have added a new v-row (line 50):
<v-row v-for="(ingredient, i) in editedItem.ingredients">
The text fields allow me to display the content. I can also edit it. But: The changes made on a given field are immediately visible even outside the v-dialog and even when clicking "Cancel", the changes are not omitted.
Also, when I add a new item and several ingredients on that, the empty arrays are not removed from editedItem.