Skip to content

Commit

Permalink
fix(tree-select): fix multiple select click parent node callback (#4579)
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn authored Sep 19, 2024
1 parent 8cae44f commit e8d29df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/tree-select/tree-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ export default defineComponent({
return props.keys?.children || 'children';
});

// timelifes
onMounted(async () => {
if (!treeSelectValue.value && props.defaultValue) {
await change(props.defaultValue, null, 'uncheck');
Expand All @@ -175,8 +174,6 @@ export default defineComponent({
changeNodeInfo();
});

// methods

const change = (
valueParam: TreeSelectValue,
node: TreeNodeModel<TreeOptionData>,
Expand Down Expand Up @@ -360,7 +357,7 @@ export default defineComponent({
onActive={treeNodeActive}
onExpand={treeNodeExpand}
onLoad={treeNodeLoad}
expandOnClickNode
expandOnClickNode={false}
v-slots={{
empty: () =>
renderDefaultTNode('empty', {
Expand Down
2 changes: 1 addition & 1 deletion src/tree/hooks/useRenderLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,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}
Expand Down

0 comments on commit e8d29df

Please sign in to comment.