We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3a45f4 commit a299147Copy full SHA for a299147
packages/react-tree/src/index.tsx
@@ -157,6 +157,10 @@ export default function Tree(props: TreeProps) {
157
setCurSelectedKeys(props.value || props.selectedKeys || []);
158
}, [JSON.stringify(props.selectedKeys), JSON.stringify(props.value)]);
159
160
+ useEffect(() => {
161
+ setCurOpenKeys(openKeys);
162
+ }, [JSON.stringify(openKeys)]);
163
+
164
useEffect(() => {
165
let arrOpenKeys: TreeData['key'][] = [...curOpenKeys];
166
if (defaultExpandAll) {
0 commit comments