Skip to content

Commit

Permalink
fix(build): add forgotten file
Browse files Browse the repository at this point in the history
  • Loading branch information
Anis SMAIL committed Dec 17, 2024
1 parent 763ea55 commit 8361ec5
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions webapp/src/components/App/Studies/StudyTree/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ function StudyTree() {
////////////////////////////////////////////////////////////////

const buildTree = (children: StudyTreeNode[], parentId?: string) => {
return children.map((elm) => {
const id = parentId ? `${parentId}/${elm.name}` : elm.name;
return children.map((child) => {
const id = parentId ? `${parentId}/${child.name}` : child.name;

return (
<TreeItemEnhanced
key={id}
itemId={id}
label={elm.name}
onClick={() => handleTreeItemClick(id, elm)}
label={child.name}
onClick={() => handleTreeItemClick(id, child)}
>
{buildTree(elm.children, id)}
{buildTree(child.children, id)}
</TreeItemEnhanced>
);
});
Expand All @@ -121,7 +121,14 @@ function StudyTree() {
<SimpleTreeView
defaultExpandedItems={[...getParentPaths(folder), folder]}
defaultSelectedItems={folder}
sx={{ flexGrow: 1, height: 0, width: 1, py: 1 }}
sx={{
flexGrow: 1,
height: 0,
width: 1,
py: 1,
overflowY: "auto",
overflowX: "hidden",
}}
>
{buildTree([studiesTree])}
</SimpleTreeView>
Expand Down

0 comments on commit 8361ec5

Please sign in to comment.