From a39d8cf686d303dddffdc7de8d02dab54de11641 Mon Sep 17 00:00:00 2001 From: Uyarn Date: Wed, 25 Dec 2024 19:09:02 +0800 Subject: [PATCH 1/2] chore: release 1.10.4 --- package.json | 2 +- src/select/util/helper.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 569f41963a..a64a9ce49d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tdesign-react", "purename": "tdesign", - "version": "1.10.3", + "version": "1.10.4", "description": "TDesign Component for React", "title": "tdesign-react", "main": "lib/index.js", diff --git a/src/select/util/helper.ts b/src/select/util/helper.ts index 09a46b51cc..b69fcda2ec 100644 --- a/src/select/util/helper.ts +++ b/src/select/util/helper.ts @@ -207,14 +207,14 @@ export const getSelectedOptions = ( .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); + : currentSelectedOptions?.find((option) => option[keys?.value || 'value'] === selectedValue); } else { currentSelectedOptions = isObjectType ? [value] : tmpPropOptions?.filter?.((v) => value === v[keys?.value || 'value']) || []; currentOption = isObjectType ? value - : currentSelectedOptions.find((option) => option[keys?.value || 'value'] === selectedValue); + : currentSelectedOptions?.find((option) => option[keys?.value || 'value'] === selectedValue); } return { currentSelectedOptions, currentOption }; From db875bf151ee3cbb8df92382061588164bc67dd7 Mon Sep 17 00:00:00 2001 From: Uyarn Date: Wed, 25 Dec 2024 19:12:01 +0800 Subject: [PATCH 2/2] chore: update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2d7f771ad..4badc18834 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ toc: false spline: explain --- -## 🌈 1.10.3 `2024-12-25` +## 🌈 1.10.4 `2024-12-25` ### 🚀 Features - `Tree`: 支持 `onScroll` API,用于处理滚动事件回调 @HaixingOoO ([#3295](https://github.com/Tencent/tdesign-react/pull/3295)) - `Tooltip`: tooltip-lite 的`mouse` 模式下优化为完全跟随鼠标位置,更符合 API 描述 @moecasts ([#3267](https://github.com/Tencent/tdesign-react/pull/3267))