From 42afc0f14d9e51c8dc596f1e0a93ea8a99e94013 Mon Sep 17 00:00:00 2001 From: mertmit Date: Sat, 15 Oct 2022 13:15:26 +0300 Subject: [PATCH] fix(nc-gui): add number type to checkbox modelValue Signed-off-by: mertmit --- packages/nc-gui/components/cell/Checkbox.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/cell/Checkbox.vue b/packages/nc-gui/components/cell/Checkbox.vue index 2496368a70..7ec76c6ace 100644 --- a/packages/nc-gui/components/cell/Checkbox.vue +++ b/packages/nc-gui/components/cell/Checkbox.vue @@ -4,7 +4,7 @@ import { ColumnInj, IsFormInj, ReadonlyInj, getMdiIcon, inject } from '#imports' interface Props { // If the previous cell value was a text, the initial checkbox value is a string type // otherwise it can be either a boolean, or a string representing a boolean, i.e '0' or '1' - modelValue?: boolean | string | '0' | '1' + modelValue?: boolean | string | number | '0' | '1' } interface Emits { @@ -16,7 +16,7 @@ const props = defineProps() const emits = defineEmits() let vModel = $computed({ - get: () => !!props.modelValue && props.modelValue !== '0', + get: () => !!props.modelValue && props.modelValue !== '0' && props.modelValue !== 0, set: (val) => emits('update:modelValue', val), })