From 2f462c42ec0828e847ca8864b4fe1beaf8bfaf71 Mon Sep 17 00:00:00 2001 From: zhouyun1 Date: Wed, 11 Sep 2024 20:51:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(check-cascader):=20=E4=BF=AE=E5=A4=8D=20che?= =?UTF-8?q?ckedMode=3D"PARENT"=E6=A8=A1=E5=BC=8F=E4=B8=8B=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=90=8E=E5=AD=90=E8=8A=82=E7=82=B9=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E9=97=AE=E9=A2=98=20(#2992)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/grumpy-tips-peel.md | 5 +++++ .changeset/silver-bulldogs-provide.md | 5 +++++ packages/ui/check-cascader/src/CheckCascader.tsx | 1 + packages/ui/check-cascader/src/CheckCascaderMenuList.tsx | 8 +++++++- 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .changeset/grumpy-tips-peel.md create mode 100644 .changeset/silver-bulldogs-provide.md diff --git a/.changeset/grumpy-tips-peel.md b/.changeset/grumpy-tips-peel.md new file mode 100644 index 000000000..5b4361a9d --- /dev/null +++ b/.changeset/grumpy-tips-peel.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/check-cascader": patch +--- + +fix: 修复 checkedMode="PARENT"模式下搜索后子节点无法选中问题 diff --git a/.changeset/silver-bulldogs-provide.md b/.changeset/silver-bulldogs-provide.md new file mode 100644 index 000000000..a1c6330f3 --- /dev/null +++ b/.changeset/silver-bulldogs-provide.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +fix(check-cascader): 修复 checkedMode="PARENT"模式下搜索后子节点无法选中问题 diff --git a/packages/ui/check-cascader/src/CheckCascader.tsx b/packages/ui/check-cascader/src/CheckCascader.tsx index d90cf7e08..6f8acb8a8 100644 --- a/packages/ui/check-cascader/src/CheckCascader.tsx +++ b/packages/ui/check-cascader/src/CheckCascader.tsx @@ -291,6 +291,7 @@ export const CheckCascader = forwardRef { @@ -164,6 +165,11 @@ export interface CascaderMenusProps { * 设置选择项数据源 */ flattedData: FlattedCheckCascaderDataItem[] + /** + * 未被过滤的选择项数据源,Hotfix:https://github.com/XiaoMi/hiui/issues/2992 + * @private + */ + originalFlattedData: FlattedCheckCascaderDataItem[] /** * 设置当前多选值 */