mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-08-02 13:00:14 -04: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 });
|
const modelValue = defineModel<MultiPurposeLabelSummary | IngredientFood | IngredientUnit | null>({ default: () => null });
|
||||||
|
|
||||||
// support v-model:item-id binding
|
// 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({
|
const props = defineProps({
|
||||||
items: {
|
items: {
|
||||||
@@ -81,7 +81,7 @@ const itemVal = computed({
|
|||||||
return modelValue.value;
|
return modelValue.value;
|
||||||
},
|
},
|
||||||
set: (val) => {
|
set: (val) => {
|
||||||
itemId.value = val?.id || "";
|
itemId.value = val?.id ?? null;
|
||||||
modelValue.value = val;
|
modelValue.value = val;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user