From 9af82a2bd0e67a26d7633566a2b5325b2fedff69 Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Wed, 23 Jul 2025 12:39:02 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feature:=20Binary=20mode=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/checkbox/VCheckbox.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/checkbox/VCheckbox.vue b/src/components/checkbox/VCheckbox.vue index 1c1cfc2..9992c58 100644 --- a/src/components/checkbox/VCheckbox.vue +++ b/src/components/checkbox/VCheckbox.vue @@ -25,7 +25,11 @@ const typeMessage = computed(() => { else return undefined }); -const binary = computed(() => Array.isArray(props.modelValue) ? undefined : props.modelValue) +const binary = computed(() => { + if (typeof props.binary === 'boolean') return props.binary; + return typeof props.modelValue === 'boolean'; +}); + const labelState = computed(() => { if((!!props.errorMessage || props.type === 'error') && !props.disabled) return 'error';