From 9d5e7e31efb2d439b18ba0bf350b712377e160a7 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Sun, 10 Nov 2024 11:50:20 -0800 Subject: [PATCH] fix(checkbox): bind `indeterminate` for Svelte 5 compatibility (#2044) Fixes #2039 --- COMPONENT_INDEX.md | 2 +- docs/src/COMPONENT_API.json | 2 +- src/Checkbox/Checkbox.svelte | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 57db9c27..78306b87 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -458,10 +458,10 @@ None. | :------------ | :------- | :--------------- | :------- | ----------------------------------------- | ------------------------------------------------ | ------------------------------------------------- | | ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element | | title | No | let | Yes | string | undefined | Specify the title attribute for the label element | +| indeterminate | No | let | Yes | boolean | false | Specify whether the checkbox is indeterminate | | group | No | let | Yes | ReadonlyArray | undefined | Specify the bound group | | checked | No | let | Yes | boolean | false | Specify whether the checkbox is checked | | value | No | let | No | any | "" | Specify the value of the checkbox | -| indeterminate | No | let | No | boolean | false | Specify whether the checkbox is indeterminate | | skeleton | No | let | No | boolean | false | Set to `true` to display the skeleton state | | required | No | let | No | boolean | false | Set to `true` to mark the field as required | | readonly | No | let | No | boolean | false | Set to `true` for the checkbox to be read-only | diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index bcf861ef..0f8d88fd 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -787,7 +787,7 @@ "isFunctionDeclaration": false, "isRequired": false, "constant": false, - "reactive": false + "reactive": true }, { "name": "skeleton", diff --git a/src/Checkbox/Checkbox.svelte b/src/Checkbox/Checkbox.svelte index 5dc43b19..7e134c76 100644 --- a/src/Checkbox/Checkbox.svelte +++ b/src/Checkbox/Checkbox.svelte @@ -97,7 +97,7 @@ checked="{checked}" disabled="{disabled}" id="{id}" - indeterminate="{indeterminate}" + bind:indeterminate name="{name}" required="{required}" readonly="{readonly}"