Fix incorrect projets item toggling
[arvados-workbench2.git] / src / views / workbench / workbench.tsx
index 85ed90c99910d36647dd98fd594beb0afbc35904..b8baeadc630988f70a8c6234eefb9df2a5ca4cb0 100644 (file)
@@ -202,16 +202,10 @@ class Workbench extends React.Component<WorkbenchProps, WorkbenchState> {
     }
 
     renderProjectPanel = (props: RouteComponentProps<{ id: string }>) => <ProjectPanel
-        onItemRouteChange={this.handleItemRouteChange}
+        onItemRouteChange={itemId => this.props.dispatch<any>(setProjectItem(itemId, ItemMode.ACTIVE))}
         onItemClick={item => this.props.dispatch<any>(setProjectItem(item.uuid, ItemMode.ACTIVE))}
         {...props} />
 
-    handleItemRouteChange = (itemId: string) => {
-        this.props.dispatch<any>(sidePanelActions.RESET_SIDE_PANEL_ACTIVITY());
-        this.props.dispatch<any>(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_OPEN(sidePanelData[0].id));
-        this.props.dispatch<any>(setProjectItem(itemId, ItemMode.ACTIVE));
-    }
-
 }
 
 export default connect<WorkbenchDataProps>(