Merge branch '21216-multiplier-typo-fix' refs #21216
[arvados.git] / services / workbench2 / src / views / subprocess-panel / subprocess-panel.tsx
index 0aa02d52701824b52d4f9611ebf2d5b49beee131..a4eb5e67a700043f2070e8013b3b921c8fa357ba 100644 (file)
@@ -10,6 +10,7 @@ import { RootState } from "store/store";
 import { navigateTo } from "store/navigation/navigation-action";
 import { loadDetailsPanel } from "store/details-panel/details-panel-action";
 import { getProcess } from "store/processes/process";
+import { toggleOne, deselectAllOthers } from 'store/multiselect/multiselect-actions';
 
 const mapDispatchToProps = (dispatch: Dispatch): SubprocessPanelActionProps => ({
     onContextMenu: (event, resourceUuid, resources) => {
@@ -18,7 +19,9 @@ const mapDispatchToProps = (dispatch: Dispatch): SubprocessPanelActionProps => (
             dispatch<any>(openProcessContextMenu(event, process));
         }
     },
-    onItemClick: (uuid: string) => {
+    onRowClick: (uuid: string) => {
+        dispatch<any>(toggleOne(uuid))
+        dispatch<any>(deselectAllOthers(uuid))
         dispatch<any>(loadDetailsPanel(uuid));
     },
     onItemDoubleClick: uuid => {
@@ -26,7 +29,7 @@ const mapDispatchToProps = (dispatch: Dispatch): SubprocessPanelActionProps => (
     },
 });
 
-const mapStateToProps = (state: RootState): SubprocessPanelDataProps => ({
+const mapStateToProps = (state: RootState): Omit<SubprocessPanelDataProps,'process'> => ({
     resources: state.resources,
 });