fix: modelValue is nullable

This commit is contained in:
MiniDigger | Martin 2022-12-20 18:49:05 +01:00
parent 2851e25f56
commit 658aebcc4d

View File

@ -4,14 +4,14 @@ import { type ValidationRule } from "@vuelidate/core";
import { useValidation } from "~/lib/composables/useValidationHelpers";
const emit = defineEmits<{
(e: "update:modelValue", value: boolean | boolean[]): void;
(e: "update:modelValue", value: boolean | boolean[] | undefined): void;
}>();
const internalVal = computed({
get: () => props.modelValue,
set: (val) => emit("update:modelValue", val),
});
const props = defineProps<{
modelValue: boolean | boolean[];
modelValue?: boolean | boolean[];
label?: string;
disabled?: boolean;
errorMessages?: string[];