Merge pull request #10657 from dataease/pr@dev-v2_bug_fix

fix(过滤组件): 数据大屏过滤组件确定按钮保存失败 #10291
This commit is contained in:
dataeaseShu 2024-07-01 16:52:51 +08:00 committed by GitHub
commit 2c0646b4b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) => {