X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2d37867eccb0a76df1a285e7b7e32bbb13db99a1..81db818eb5a3404d0b98e6afbbbccc1ae064fd48:/src/views/project-panel/project-panel.tsx

diff --git a/src/views/project-panel/project-panel.tsx b/src/views/project-panel/project-panel.tsx
index 0cd74ff913..dd61e58a74 100644
--- a/src/views/project-panel/project-panel.tsx
+++ b/src/views/project-panel/project-panel.tsx
@@ -19,10 +19,9 @@ import { RouteComponentProps } from 'react-router';
 
 export const PROJECT_PANEL_ID = "projectPanel";
 
-type ProjectPanelProps = { onItemOpen: (itemId: string) => void }
+type ProjectPanelProps = { onItemClick: (item: ProjectPanelItem) => void }
     & DispatchProp
-    & WithStyles<CssRules>
-    & RouteComponentProps<{ id: string }>;
+    & WithStyles<CssRules>;
 class ProjectPanel extends React.Component<ProjectPanelProps> {
     render() {
         return <div>
@@ -42,7 +41,7 @@ class ProjectPanel extends React.Component<ProjectPanelProps> {
                 contextActions={contextMenuActions}
                 onColumnToggle={this.toggleColumn}
                 onFiltersChange={this.changeFilters}
-                onRowClick={this.openProject}
+                onRowClick={this.props.onItemClick}
                 onSortToggle={this.toggleSort}
                 onSearch={this.search}
                 onContextAction={this.executeAction}
@@ -55,12 +54,6 @@ class ProjectPanel extends React.Component<ProjectPanelProps> {
         this.props.dispatch(actions.SET_COLUMNS({ id: PROJECT_PANEL_ID, columns }));
     }
 
-    componentWillReceiveProps(nextProps: ProjectPanelProps) {
-        if (this.props.match.params.id !== nextProps.match.params.id) {
-            this.props.onItemOpen(nextProps.match.params.id);
-        }
-    }
-
     toggleColumn = (toggledColumn: DataColumn<ProjectPanelItem>) => {
         this.props.dispatch(actions.TOGGLE_COLUMN({ id: PROJECT_PANEL_ID, columnName: toggledColumn.name }));
     }
@@ -88,10 +81,6 @@ class ProjectPanel extends React.Component<ProjectPanelProps> {
     changeRowsPerPage = (rowsPerPage: number) => {
         this.props.dispatch(actions.SET_ROWS_PER_PAGE({ id: PROJECT_PANEL_ID, rowsPerPage }));
     }
-
-    openProject = (item: ProjectPanelItem) => {
-        this.props.onItemOpen(item.uuid);
-    }
 }
 
 type CssRules = "toolbar" | "button";
