21128: multiselect vs details panel resolved Arvados-DCO-1.1-Signed-off-by: Lisa...
[arvados-workbench2.git] / src / views-components / data-explorer / data-explorer.tsx
index 55a254aba7f9ab791a44ab749d9a1e5781257667..6c9aeb06006b6c96ff0fc3126ae703bab0147602 100644 (file)
@@ -27,7 +27,8 @@ const mapStateToProps = (state: RootState, { id }: Props) => {
     const dataExplorerState = getDataExplorer(state.dataExplorer, id);
     const currentRoute = state.router.location ? state.router.location.pathname : "";
     const currentRefresh = localStorage.getItem(LAST_REFRESH_TIMESTAMP) || "";
-    const currentItemUuid = currentRoute === "/workflows" ? state.properties.workflowPanelDetailsUuid : state.detailsPanel.resourceUuid;
+    const isDetailsResourceChecked = state.multiselect.checkedList[state.detailsPanel.resourceUuid]
+    const currentItemUuid = currentRoute === "/workflows" ? state.properties.workflowPanelDetailsUuid : isDetailsResourceChecked ? state.detailsPanel.resourceUuid : state.multiselect.selectedUuid;
     const isMSToolbarVisible = state.multiselect.isVisible;
     return {
         ...dataExplorerState,