code style format

This commit is contained in:
SuperYY 2024-02-23 12:52:27 +00:00
parent 0e633ac02a
commit 116efaf48e

View File

@ -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]));