diff --git a/webapp/src/components/App/Studies/StudyTree/index.tsx b/webapp/src/components/App/Studies/StudyTree/index.tsx index 0be6ccb9a8..a5a852a652 100644 --- a/webapp/src/components/App/Studies/StudyTree/index.tsx +++ b/webapp/src/components/App/Studies/StudyTree/index.tsx @@ -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 ( handleTreeItemClick(id, elm)} + label={child.name} + onClick={() => handleTreeItemClick(id, child)} > - {buildTree(elm.children, id)} + {buildTree(child.children, id)} ); }); @@ -121,7 +121,14 @@ function StudyTree() { {buildTree([studiesTree])}