From 19edbfe7774d1b9d4576401703b4d8594246c9c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 27 May 2021 13:29:34 +0200 Subject: [PATCH] Trigger attachment loading when switching the card sidebar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/card/AttachmentList.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/card/AttachmentList.vue b/src/components/card/AttachmentList.vue index cb54e0a27..66a1c38e4 100644 --- a/src/components/card/AttachmentList.vue +++ b/src/components/card/AttachmentList.vue @@ -151,8 +151,13 @@ export default { } }, }, - created() { - this.$store.dispatch('fetchAttachments', this.cardId) + watch: { + cardId: { + immediate: true, + handler() { + this.$store.dispatch('fetchAttachments', this.cardId) + }, + }, }, methods: { handleUploadFile(event) {