From 6319203009ed914504e23ff263b090e6250709fa Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Tue, 9 May 2023 17:56:30 -0400 Subject: [PATCH] 20487: Correctly dispatch loadProject from openProjectPanel Also fix it to recognize PDH in the files panel. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- .../collection-panel-files/collection-panel-files.tsx | 4 ++-- src/store/project-panel/project-panel-action.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/collection-panel-files/collection-panel-files.tsx b/src/components/collection-panel-files/collection-panel-files.tsx index b75f3018..4896641b 100644 --- a/src/components/collection-panel-files/collection-panel-files.tsx +++ b/src/components/collection-panel-files/collection-panel-files.tsx @@ -39,7 +39,7 @@ import { setCollectionFiles } from 'store/collection-panel/collection-panel-file import { sortBy } from 'lodash'; import { formatFileSize } from 'common/formatters'; import { getInlineFileUrl, sanitizeToken } from 'views-components/context-menu/actions/helpers'; -import { extractUuidObjectType, ResourceObjectType } from 'models/resource'; +import { extractUuidKind, ResourceKind } from 'models/resource'; export interface CollectionPanelFilesProps { isWritable: boolean; @@ -261,7 +261,7 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState const rightData = pathData[rightKey]; React.useEffect(() => { - if (props.currentItemUuid && extractUuidObjectType(props.currentItemUuid) == ResourceObjectType.COLLECTION) { + if (props.currentItemUuid && extractUuidKind(props.currentItemUuid) == ResourceKind.COLLECTION) { setPathData({}); setPath([props.currentItemUuid]); } diff --git a/src/store/project-panel/project-panel-action.ts b/src/store/project-panel/project-panel-action.ts index 6b99e300..7ad18b67 100644 --- a/src/store/project-panel/project-panel-action.ts +++ b/src/store/project-panel/project-panel-action.ts @@ -16,7 +16,7 @@ export const projectPanelActions = bindDataExplorerActions(PROJECT_PANEL_ID); export const openProjectPanel = (projectUuid: string) => async (dispatch: Dispatch) => { - await loadProject(projectUuid); + await dispatch(loadProject(projectUuid)); dispatch(propertiesActions.SET_PROPERTY({ key: PROJECT_PANEL_CURRENT_UUID, value: projectUuid })); dispatch(projectPanelActions.RESET_EXPLORER_SEARCH_VALUE()); dispatch(projectPanelActions.REQUEST_ITEMS()); -- 2.30.2