From 6f81240a7592b28ac5cfd285278606714ea96820 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Mon, 1 Jul 2024 16:52:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F=E8=BF=87=E6=BB=A4=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E7=A1=AE=E5=AE=9A=E6=8C=89=E9=92=AE=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=20#10291?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/hooks/web/useFilter.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/hooks/web/useFilter.ts b/core/core-frontend/src/hooks/web/useFilter.ts index 9a49209380..7617abdb59 100644 --- a/core/core-frontend/src/hooks/web/useFilter.ts +++ b/core/core-frontend/src/hooks/web/useFilter.ts @@ -125,7 +125,8 @@ const getValueByDefaultValueCheckOrFirstLoad = ( if (firstLoad && !selectValue?.length) { return defaultValueCheck ? defaultValue : multiple ? [] : '' } - return selectValue || '' + + return selectValue ? (Array.isArray(selectValue) ? selectValue : [selectValue]) : '' } export const useFilter = (curComponentId: string, firstLoad = false) => {