From 309c413f76c057d8d5b5927e20c198269702c22f Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Thu, 15 Oct 2020 09:18:20 -0400 Subject: [PATCH] Fix indeterminate state bug --- docs/getting-started/changelog.md | 1 + src/components/checkbox/checkbox.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/getting-started/changelog.md b/docs/getting-started/changelog.md index eef5388af..b920e1535 100644 --- a/docs/getting-started/changelog.md +++ b/docs/getting-started/changelog.md @@ -9,6 +9,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis ## Next - Fixed a bug where initial transitions didn't show in `sl-dialog` and `sl-drawer` [#247](https://github.com/shoelace-style/shoelace/issues/247) +- Fixed a bug where indeterminate checkboxes would maintain the indeterminate state when toggled - Improved `sl-color-picker` grid and slider handles [#246](https://github.com/shoelace-style/shoelace/issues/246) - Reworked show/hide logic in `sl-alert`, `sl-dialog`, and `sl-drawer` to not use reflow hacks and the `hidden` attribute - Updated to Popper 2.5.3 to address a fixed position bug in Firefox diff --git a/src/components/checkbox/checkbox.tsx b/src/components/checkbox/checkbox.tsx index 2ebe7702c..a6014338c 100644 --- a/src/components/checkbox/checkbox.tsx +++ b/src/components/checkbox/checkbox.tsx @@ -103,7 +103,7 @@ export class Checkbox { handleClick() { this.checked = this.input.checked; - this.indeterminate = this.input.indeterminate; + this.indeterminate = false; } handleBlur() {