From 4e68c1ca137bccb8d331f48f4d2bbd3a08670082 Mon Sep 17 00:00:00 2001 From: Sean King Date: Sun, 26 Jun 2022 13:25:36 -0600 Subject: [PATCH] Use watch to change localDescription --- src/components/attachment/attachment.js | 3 +++ src/components/attachment/attachment.vue | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index 5450f7a1..0568c6e2 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -132,6 +132,9 @@ const Attachment = { ...mapGetters(['mergedConfig']) }, watch: { + 'attachment.description' (newVal) { + this.localDescription = newVal + }, localDescription (newVal) { this.onEdit(newVal) } diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index d2c5531b..947b1bfc 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -166,7 +166,7 @@ :icon="placeholderIconClass" />

- {{ edit ? localDescription : attachment.description }} + {{ localDescription }}

@@ -244,7 +244,7 @@
@@ -259,7 +259,7 @@ @input="resize" />

- {{ attachment.description }} + {{ localDescription }}