From 3fc0697a12e3ff6e007436d865aba0d9da4a63f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?w=C5=AB=20y=C4=81ng?= Date: Mon, 20 May 2024 18:48:53 +0800 Subject: [PATCH] fix(Select): fix indeterminate status style (#2915) * fix(Menu): fix submenu classname * fix(Select): fix indeterminate status --- src/select/base/Option.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/select/base/Option.tsx b/src/select/base/Option.tsx index 936da6130..ac5ce6d82 100644 --- a/src/select/base/Option.tsx +++ b/src/select/base/Option.tsx @@ -60,6 +60,7 @@ const Option: React.FC = (props) => { } = props; let selected: boolean; + let indeterminate: boolean; const label = propLabel || value; const disabled = propDisabled || (multiple && Array.isArray(selectedValue) && max && selectedValue.length >= max); @@ -98,6 +99,7 @@ const Option: React.FC = (props) => { }); if (props.checkAll) { selected = selectedValue.length === props.optionLength; + indeterminate = selectedValue.length > 0 && !selected; } } @@ -115,6 +117,7 @@ const Option: React.FC = (props) => { return (