Tree component adjsustments for dynamic contents
[arvados.git] / src / views / workbench / workbench.tsx
index d18d113bcbca66ced17a91bfc920e04a7d1be65d..3767e7b0517fba3a7939669dd6bd733cb08fc626 100644 (file)
@@ -105,9 +105,11 @@ class Workbench extends React.Component<WorkbenchProps, WorkbenchState> {
     };
 
     toggleProjectTreeItem = (itemId: string) => {
-        this.props.dispatch<any>(projectService.getProjectList(itemId)).then(() => {
-            this.props.dispatch(projectActions.TOGGLE_PROJECT_TREE_ITEM(itemId));
-        });
+        this.props.projects ? 
+            this.props.dispatch(projectActions.TOGGLE_PROJECT_TREE_ITEM(itemId)) : ( 
+                this.props.dispatch<any>(projectService.getProjectList(itemId)).then(() => {
+                    this.props.dispatch(projectActions.TOGGLE_PROJECT_TREE_ITEM(itemId));
+                }))
     };
 
     render() {