fix desc save bug

Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
Jakob Röhrl
2021-02-09 10:07:26 +01:00
committed by Julius Härtl
parent 418536ceb1
commit a34c3b0667
2 changed files with 5 additions and 4 deletions

View File

@@ -117,7 +117,7 @@
type="deck-card" />
</div>
<Description :key="card.id" :card="card" />
<Description :key="card.id" :card="card" @change="descriptionChanged" />
</div>
</template>
@@ -234,6 +234,9 @@ export default {
this.initialize()
},
methods: {
descriptionChanged(newDesc) {
this.copiedCard.description = newDesc
},
async initialize() {
if (!this.card) {
return
@@ -253,9 +256,6 @@ export default {
}
},
setDue() {
this.$store.dispatch('updateCardDue', this.copiedCard)
},
removeDue() {
this.copiedCard.duedate = null
this.$store.dispatch('updateCardDue', this.copiedCard)

View File

@@ -205,6 +205,7 @@ export default {
await this.$store.dispatch('updateCardDesc', { ...this.card, description: this.description })
this.descriptionLastEdit = 0
this.descriptionSaving = false
this.$emit('change', this.description)
},
updateDescription() {
this.descriptionLastEdit = Date.now()