mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-16 05:58:26 +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.
|
||||
const firstLayerLeafs = Object.values(keyEntities)
|
||||
.filter((item) => {
|
||||
if (item.parent === undefined && item?.node.isLeaf === true) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return item.parent === undefined && item?.node.isLeaf === true;
|
||||
})
|
||||
.map((item) => item.key);
|
||||
initExpandedKeys = Array.from(new Set([...initExpandedKeys, ...firstLayerLeafs]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue