From cb5302ea48a776e2438a65ff55e1e9c7c4486c3d Mon Sep 17 00:00:00 2001 From: cuicuiworld <407060373@qq.com> Date: Fri, 17 Feb 2023 17:55:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20checkboxgroup=E7=BB=84=E4=BB=B6=E9=80=9A?= =?UTF-8?q?=E8=BF=87options=E6=B8=B2=E6=9F=93=E6=97=B6=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E5=80=BC=E5=8F=8D=E5=A1=AB=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#680)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/checkboxgroup/checkboxgroup.taro.tsx | 6 +++--- src/packages/checkboxgroup/checkboxgroup.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/packages/checkboxgroup/checkboxgroup.taro.tsx b/src/packages/checkboxgroup/checkboxgroup.taro.tsx index 98a3896..a2d853b 100644 --- a/src/packages/checkboxgroup/checkboxgroup.taro.tsx +++ b/src/packages/checkboxgroup/checkboxgroup.taro.tsx @@ -96,8 +96,8 @@ export const CheckboxGroup = React.forwardRef( } function validateChecked(value: any) { - if (innerValue === null) return false - return innerValue === value + if (!innerValue) return false + return innerValue?.indexOf(value) > -1 } function getParentVals() { @@ -137,7 +137,7 @@ export const CheckboxGroup = React.forwardRef( /> ) }) - }, [innerValue, options]) + }, [innerValue, options, innerDisabled, max]) return (