From ea8e987cf930fa1157ed4769ba282eef14800337 Mon Sep 17 00:00:00 2001 From: Uyarn Date: Fri, 20 Sep 2024 14:47:19 +0800 Subject: [PATCH] fix(tree-select): fix multiple select click parent node callback --- src/tree-select/tree-select.tsx | 2 +- src/tree/hooks/useRenderLabel.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tree-select/tree-select.tsx b/src/tree-select/tree-select.tsx index ab0ef06d1..d90528c8b 100644 --- a/src/tree-select/tree-select.tsx +++ b/src/tree-select/tree-select.tsx @@ -104,7 +104,7 @@ export default defineComponent({ onLoad: this.treeNodeLoad, onChange: this.treeNodeChange, onActive: this.treeNodeActive, - expandOnClickNode: true, + expandOnClickNode: false, empty: () => this.renderDefaultTNode('empty', { defaultNode:
{this.global.empty}
, }), diff --git a/src/tree/hooks/useRenderLabel.tsx b/src/tree/hooks/useRenderLabel.tsx index 3efff0365..c765411d0 100644 --- a/src/tree/hooks/useRenderLabel.tsx +++ b/src/tree/hooks/useRenderLabel.tsx @@ -72,7 +72,7 @@ export default function useRenderLabel(state: TypeTreeItemState) { name={String(node.value)} onChange={handleChange} stopLabelTrigger={shouldStopLabelTrigger.value} - ignore="expand,active" + ignore={treeProps.expandOnClickNode ? 'active' : 'expand,active'} props={itemCheckProps} > {labelNode}