diff --git a/src/components/ProjectListItemCollapsable/ProjectListItemCollapsable.tsx b/src/components/ProjectListItemCollapsable/ProjectListItemCollapsable.tsx index 7dbf974bf..298edbe6b 100644 --- a/src/components/ProjectListItemCollapsable/ProjectListItemCollapsable.tsx +++ b/src/components/ProjectListItemCollapsable/ProjectListItemCollapsable.tsx @@ -37,8 +37,9 @@ export const ProjectListItemCollapsable: React.FC { const [collapsed, setIsCollapsed] = useState(true); const [collapsedGoals, setIsCollapsedGoals] = useState(true); + const contentHidden = collapsed || loading; - const offset = collapseOffset * (collapsed ? deep - 1 : deep); + const offset = collapseOffset * (contentHidden ? deep - 1 : deep); const childs = useMemo(() => project.children.map(({ id }) => id), [project]); const onClickEnabled = childs.length; @@ -65,7 +66,7 @@ export const ProjectListItemCollapsable: React.FC