fix #12396. Support expandedKeys when init

This commit is contained in:
zombiej 2018-09-25 15:29:07 +08:00
parent 05e4c56ca3
commit 1c85bb3b62

View File

@ -61,7 +61,7 @@ export default class DirectoryTree extends React.Component<DirectoryTreeProps, D
} else if (defaultExpandParent) { } else if (defaultExpandParent) {
this.state.expandedKeys = conductExpandParent(expandedKeys || defaultExpandedKeys, keyEntities); this.state.expandedKeys = conductExpandParent(expandedKeys || defaultExpandedKeys, keyEntities);
} else { } else {
this.state.expandedKeys = defaultExpandedKeys; this.state.expandedKeys = expandedKeys || defaultExpandedKeys;
} }
this.onDebounceExpand = debounce(this.expandFolderNode, 200, { this.onDebounceExpand = debounce(this.expandFolderNode, 200, {