From 26bda14874f8652fee29da9fd0051ae3d3da2401 Mon Sep 17 00:00:00 2001 From: huangchen1031 Date: Tue, 19 Nov 2024 15:29:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(select):=20=E5=A4=9A=E9=80=89=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86=E5=85=A8=E9=80=89=E5=8A=9F=E8=83=BD=E5=A4=B1?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/select/base/Select.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/select/base/Select.tsx b/src/select/base/Select.tsx index d0a5fe988a..f7d002756f 100644 --- a/src/select/base/Select.tsx +++ b/src/select/base/Select.tsx @@ -192,8 +192,10 @@ const Select = forwardRefWithStatics( return; } - const values = currentOptions.filter((option) => !option.checkAll && !option.disabled) - const selectableOptions = getSelectedOptions(values, multiple, valueType, keys, tmpPropOptions) + const values = currentOptions + .filter((option) => !option.checkAll && !option.disabled) + .map((option) => option[keys?.value || 'value']); + const selectableOptions = getSelectedOptions(values, multiple, valueType, keys, tmpPropOptions); const checkAllValue = !checkAll && selectableOptions.length !== (props.value as Array)?.length ? selectableOptions : [];