1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 19:34:34 +00:00

feat(web): directory tree in sidebar of drive should be expanded by default at root level

This commit is contained in:
2022-03-16 19:13:50 +00:00
parent fb77d99177
commit 3d89b753f0

View File

@@ -68,12 +68,15 @@ const SideBar = ({ directoryData, handleSelect }: Props) => {
>
<Toolbar />
<Box sx={{ overflow: 'auto' }}>
<TreeView
defaultCollapseIcon={<ExpandMoreIcon />}
defaultExpandIcon={<ChevronRightIcon />}
>
{directoryData && renderTree(directoryData)}
</TreeView>
{directoryData && (
<TreeView
defaultCollapseIcon={<ExpandMoreIcon />}
defaultExpandIcon={<ChevronRightIcon />}
defaultExpanded={[directoryData.relativePath]}
>
{renderTree(directoryData)}
</TreeView>
)}
</Box>
</Drawer>
)