mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-09 02:23:44 +08:00
code style format
This commit is contained in:
parent
0e633ac02a
commit
116efaf48e
@ -69,10 +69,7 @@ const DirectoryTree: React.ForwardRefRenderFunction<RcTree, DirectoryTreeProps>
|
|||||||
// If not specified, expand all leaf nodes in the first level.
|
// If not specified, expand all leaf nodes in the first level.
|
||||||
const firstLayerLeafs = Object.values(keyEntities)
|
const firstLayerLeafs = Object.values(keyEntities)
|
||||||
.filter((item) => {
|
.filter((item) => {
|
||||||
if (item.parent === undefined && item?.node.isLeaf === true) {
|
return item.parent === undefined && item?.node.isLeaf === true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
})
|
})
|
||||||
.map((item) => item.key);
|
.map((item) => item.key);
|
||||||
initExpandedKeys = Array.from(new Set([...initExpandedKeys, ...firstLayerLeafs]));
|
initExpandedKeys = Array.from(new Set([...initExpandedKeys, ...firstLayerLeafs]));
|
||||||
|
Loading…
Reference in New Issue
Block a user