Skip to content

Commit 45554f9

Browse files
Jacques MannonJacques Mannon
authored andcommitted
Bug fix: saving old value instead of new
1 parent 6387a58 commit 45554f9

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/components/VueEditortable.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@
2323
</v-card-row>
2424
<v-card-row >
2525
<v-card-text>
26-
<v-checkbox v-for="(col, index) in cols" :label="col.name" :name="col.name" v-model="col.show" @change="updateShowColumns(index)" dark></v-checkbox>
26+
<v-checkbox
27+
v-for="(col, index) in cols"
28+
:label="col.name"
29+
:name="col.name"
30+
v-model="col.show"
31+
@change="updateShowColumns(index)"
32+
:key="col.name"
33+
dark>
34+
</v-checkbox>
2735
</v-card-text>
2836
</v-card-row>
2937
</v-card>
@@ -126,7 +134,7 @@
126134
spellcheck="false"
127135
v-show="cell.isActive && cell.isEditable"
128136
v-model="thisCell.value"
129-
@change="saveData(rowIndex, key, filteredData[rowIndex][key].value, filteredData[rowIndex].id.value, $event)"
137+
@change="saveData(rowIndex, key, thisCell.value, filteredData[rowIndex].id.value, $event)"
130138
@keydown.shift.left="selectCell(rowIndex, index, $event)"
131139
@keydown.shift.right="selectCell(rowIndex, index, $event)"
132140
@keydown.up="selectCell(rowIndex, index, $event)"
@@ -761,7 +769,7 @@
761769
vm.savingIndex = false;
762770
}
763771
if (errors.length === 0) {
764-
console.log('inside save', errors.length);
772+
console.log('inside save', value);
765773
const postData = {};
766774
postData[key] = value;
767775
const data = postData;

0 commit comments

Comments
 (0)