Skip to content

Commit 3df4bc3

Browse files
committed
Update task card when the task changes
1 parent 21e2768 commit 3df4bc3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

dashboard/src/components/Task.vue

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { ref } from "vue";
2+
import { ref, watch } from "vue";
33
44
import StatusBadge from "@/components/StatusBadge.vue";
55
import { FormatDateTime } from "@/composables/dateFormat";
@@ -45,6 +45,15 @@ const props = defineProps<{
4545
}>();
4646
4747
const card = ref(new Card(props.task));
48+
49+
watch(
50+
() => props.task,
51+
(task) => {
52+
const isOpen = card.value.isOpen;
53+
card.value = new Card(task);
54+
card.value.isOpen = isOpen;
55+
},
56+
);
4857
</script>
4958

5059
<template>

0 commit comments

Comments
 (0)