1π
First, you missed :key
property in v-for
, so all yours rows are treated as same β change this line like this: <tr v-for="(file, fileKey) in files" :key="file">
Second, in you loop you are assigning to all rows the same product, and this is leads to behaviour you want to avoid:
const product = Object.assign({}, this.order['products'][this.getSelectedFile]);
...
this.selectedFiles.forEach(fileIndex => {
order['products'][fileIndex] = product || {};
});
π€Alex Brohshtut
Source:stackexchange.com