diff --git a/frontend/app/components/global/InputLabelType.vue b/frontend/app/components/global/InputLabelType.vue index eba29551a..2e5c42535 100644 --- a/frontend/app/components/global/InputLabelType.vue +++ b/frontend/app/components/global/InputLabelType.vue @@ -42,7 +42,7 @@ import { useSearch } from "~/composables/use-search"; const modelValue = defineModel({ default: () => null }); // support v-model:item-id binding -const itemId = defineModel("item-id", { default: undefined }); +const itemId = defineModel("item-id", { default: undefined }); const props = defineProps({ items: { @@ -81,7 +81,7 @@ const itemVal = computed({ return modelValue.value; }, set: (val) => { - itemId.value = val?.id || ""; + itemId.value = val?.id ?? null; modelValue.value = val; }, });