From 709b67d79e2a3081e6ddeb26fbdf5ef26db9ea87 Mon Sep 17 00:00:00 2001 From: JB Date: Tue, 19 Dec 2023 15:46:02 +0100 Subject: [PATCH] fix(checkbox): enable null value --- src/components/checkbox/UCheckbox.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/checkbox/UCheckbox.vue b/src/components/checkbox/UCheckbox.vue index b8fba91..4d3b194 100644 --- a/src/components/checkbox/UCheckbox.vue +++ b/src/components/checkbox/UCheckbox.vue @@ -6,7 +6,7 @@ import type { DeepPartial } from '~/types' export type T = string | number | boolean | Record const props = withDefaults(defineProps<{ - modelValue?: boolean | any[] + modelValue?: boolean | any[] | null value?: T isChecked?: boolean isDisabled?: boolean @@ -21,7 +21,7 @@ const props = withDefaults(defineProps<{ const emit = defineEmits<{ (eventName: 'focus', value: FocusEvent): void (eventName: 'blur', value: FocusEvent): void - (eventName: 'update:model-value', value?: boolean | T[]): void + (eventName: 'update:model-value', value?: boolean | T[] | null): void }>() const isChecked = computed({ get() {