From f0c28c9eb8bc1b5d5e8924c63d26603043fa84ee Mon Sep 17 00:00:00 2001 From: Fabien MARIE-LOUISE Date: Mon, 8 May 2023 18:08:04 +0200 Subject: [PATCH] fix: #214 --- packages/core/src/checkbox/checkbox-input.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/checkbox/checkbox-input.tsx b/packages/core/src/checkbox/checkbox-input.tsx index 0fd81bd4..a733b73f 100644 --- a/packages/core/src/checkbox/checkbox-input.tsx +++ b/packages/core/src/checkbox/checkbox-input.tsx @@ -89,9 +89,9 @@ export function CheckboxInput(props: CheckboxInputProps) { // Clicking on the input will change its internal `indeterminate` state. // To prevent this, we need to force the input `indeterminate` state to be in sync with our. createEffect( - on([() => ref, () => context.checked()], ([ref]) => { + on([() => ref, () => context.indeterminate()], ([ref, indeterminate]) => { if (ref) { - ref.indeterminate = context.indeterminate() || false; + ref.indeterminate = !!indeterminate; } }) );