Skip to content

Commit

Permalink
fix(Tree): 修复子节点无法控制超过 2 级上层节点状态 (#572) (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
nullptr-z committed Mar 1, 2022
1 parent cb95e91 commit fb39cc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-tree/src/index.tsx
Expand Up @@ -101,7 +101,7 @@ const getParentSelectKeys = (
selectedKeys: TreeData['key'][] = [],
result: TreeData['key'][] = [],
) => {
if (childs.key && childs.children && isContained(selectedKeys, getChildKeys(childs.children))) {
if (childs.key && childs.children && isContained(selectedKeys, getChildKeys(childs.children, undefined, 1))) {
result.push(childs.key);
if (childs.parent && !childs.parent.parent) {
if (isContained(selectedKeys, getChildKeys(childs.children))) {
Expand Down

0 comments on commit fb39cc9

Please sign in to comment.