20487: loadProject doesn't call openProjectPanel
[arvados-workbench2.git] / src / store / project-panel / project-panel-action.ts
index 3b30f4aab5e3577fdc5c3f3632b7fb0dd60f9f50..6b99e300692de38b762eea09eaa7774e9b7191d0 100644 (file)
@@ -7,6 +7,7 @@ import { bindDataExplorerActions } from "store/data-explorer/data-explorer-actio
 import { propertiesActions } from "store/properties/properties-actions";
 import { RootState } from 'store/store';
 import { getProperty } from "store/properties/properties";
+import { loadProject } from "store/workbench/workbench-actions";
 
 export const PROJECT_PANEL_ID = "projectPanel";
 export const PROJECT_PANEL_CURRENT_UUID = "projectPanelCurrentUuid";
@@ -14,7 +15,8 @@ export const IS_PROJECT_PANEL_TRASHED = 'isProjectPanelTrashed';
 export const projectPanelActions = bindDataExplorerActions(PROJECT_PANEL_ID);
 
 export const openProjectPanel = (projectUuid: string) =>
-    (dispatch: Dispatch) => {
+    async (dispatch: Dispatch) => {
+        await loadProject(projectUuid);
         dispatch(propertiesActions.SET_PROPERTY({ key: PROJECT_PANEL_CURRENT_UUID, value: projectUuid }));
         dispatch(projectPanelActions.RESET_EXPLORER_SEARCH_VALUE());
         dispatch(projectPanelActions.REQUEST_ITEMS());