mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-08-07 11:24:52 +00:00
fix: Clear InputLabelType item-id as null instead of empty string (#7950)
This commit is contained in:
committed by
GitHub
parent
f424aa29c2
commit
7fb8e0b1a9
@@ -42,7 +42,7 @@ import { useSearch } from "~/composables/use-search";
|
||||
const modelValue = defineModel<MultiPurposeLabelSummary | IngredientFood | IngredientUnit | null>({ default: () => null });
|
||||
|
||||
// support v-model:item-id binding
|
||||
const itemId = defineModel<string | undefined>("item-id", { default: undefined });
|
||||
const itemId = defineModel<string | null | undefined>("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;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user