mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-16 22:18:28 +02:00
code style format
This commit is contained in:
parent
0e633ac02a
commit
116efaf48e
1 changed files with 1 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue