Skip to content

Commit 9d66cef

Browse files
authored
Merge pull request #93 from it-at-m/bug/checking-item-freeze
bug/checking-item-freeze
2 parents 0017b73 + bd7c2b2 commit 9d66cef

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

personalization-webcomponents/src/components/ChecklistList.vue

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="container">
33
<sortable
4-
:list="list"
4+
:list="modelValue"
55
tag="ul"
66
class="list"
77
:animation="200"
@@ -66,9 +66,9 @@ import type DummyChecklistItem from "@/api/dummyservice/DummyChecklistItem.ts";
6666
6767
import { MucIcon } from "@muenchen/muc-patternlab-vue";
6868
import { Sortable } from "sortablejs-vue3";
69-
import { defineEmits, ref, watch } from "vue";
69+
import { defineEmits, ref } from "vue";
7070
71-
const props = withDefaults(
71+
withDefaults(
7272
defineProps<{
7373
modelValue: DummyChecklistItem[];
7474
isDraggable?: boolean;
@@ -79,28 +79,12 @@ const props = withDefaults(
7979
disabled: false,
8080
}
8181
);
82-
const emit = defineEmits(["checked", "update:modelValue", "label-click"]);
83-
const list = ref<DummyChecklistItem[]>([...props.modelValue]);
82+
const emit = defineEmits(["checked", "label-click"]);
8483
const drag = ref(false);
8584
8685
const dialogVisible = ref(false);
8786
const dialogItem = ref<DummyChecklistItem | null>(null);
8887
89-
watch(
90-
() => props.modelValue,
91-
(newVal) => {
92-
list.value = [...newVal];
93-
}
94-
);
95-
96-
watch(
97-
list,
98-
(newVal) => {
99-
emit("update:modelValue", [...newVal]);
100-
},
101-
{ deep: true }
102-
);
103-
10488
function onSelectChange(serviceID: string) {
10589
emit("checked", serviceID);
10690
}

0 commit comments

Comments
 (0)