Skip to content

Commit 0190f3a

Browse files
committed
fix: Availavle id list
1 parent e3860ba commit 0190f3a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/src/components/dynamics-form/items/knowledge/Knowledge.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ const props = withDefaults(
4141
const emit = defineEmits(['update:modelValue', 'change'])
4242
4343
const model_value = computed({
44-
get: () => props.modelValue || [],
44+
get: () =>
45+
props.modelValue.filter((id: string) => availableList.value.some((item) => item.id === id)) ||
46+
[],
4547
set: (value: string[]) => {
4648
emit('update:modelValue', value)
4749
emit('change', props.formField)

0 commit comments

Comments
 (0)