Skip to content

Commit

Permalink
fix(Tree): 修复默认展开父节点参数(autoExpandParent)首次渲染不生效问题 (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
nullptr-z committed Mar 3, 2022
1 parent c007d07 commit 4297d62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-tree/src/index.tsx
Expand Up @@ -151,7 +151,7 @@ export default function Tree(props: TreeProps) {
// useEffect(() => setCurSelectedKeys(selectedKeys), [selectedKeys]);

useEffect(() => {
let arrOpenKeys: TreeData['key'][] = curOpenKeys;
let arrOpenKeys: TreeData['key'][] = [...curOpenKeys];
if (defaultExpandAll) {
arrOpenKeys = getChildKeys(data);
} else if (autoExpandParent) {
Expand Down

0 comments on commit 4297d62

Please sign in to comment.