From 2b79edb364ba0554c83e18367e685879479a5e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?w=C5=AB=20y=C4=81ng?= Date: Wed, 25 Dec 2024 18:45:35 +0800 Subject: [PATCH] fix(Select): fix checkall default value (#3298) --- src/select/util/helper.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/select/util/helper.ts b/src/select/util/helper.ts index 4d51d493a..09a46b51c 100644 --- a/src/select/util/helper.ts +++ b/src/select/util/helper.ts @@ -202,7 +202,9 @@ export const getSelectedOptions = ( if (multiple) { currentSelectedOptions = isObjectType ? (value as Array) - : tmpPropOptions?.filter?.((v) => (value as Array).includes?.(v[keys?.value || 'value'])); + : tmpPropOptions + ?.filter?.((v) => (value as Array).includes?.(v[keys?.value || 'value'])) + .map((v) => v[keys?.value || 'value']); currentOption = isObjectType ? (value as Array).find((v) => v[keys?.value || 'value'] === selectedValue) : currentSelectedOptions.find((option) => option[keys?.value || 'value'] === selectedValue);