X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/a2bf1ed3a15cf55e426c51ad8e6febd7ff2e3020..135ec797465fc6052cb51ef00243d86f6d794659:/src/views/shared-with-me-panel/shared-with-me-panel.tsx

diff --git a/src/views/shared-with-me-panel/shared-with-me-panel.tsx b/src/views/shared-with-me-panel/shared-with-me-panel.tsx
index 9106f870..582aa9c7 100644
--- a/src/views/shared-with-me-panel/shared-with-me-panel.tsx
+++ b/src/views/shared-with-me-panel/shared-with-me-panel.tsx
@@ -14,9 +14,8 @@ import { navigateTo } from "~/store/navigation/navigation-action";
 import { loadDetailsPanel } from "~/store/details-panel/details-panel-action";
 import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
 import { SHARED_WITH_ME_PANEL_ID } from '~/store/shared-with-me-panel/shared-with-me-panel-actions';
-import { openContextMenu } from '~/store/context-menu/context-menu-actions';
+import { openContextMenu, resourceKindToContextMenuKind } from '~/store/context-menu/context-menu-actions';
 import { GroupResource } from '~/models/group';
-import { ContextMenuKind } from '~/views-components/context-menu/context-menu';
 
 type CssRules = "toolbar" | "button";
 
@@ -52,17 +51,19 @@ export const SharedWithMePanel = withStyles(styles)(
             }
 
             handleContextMenu = (event: React.MouseEvent<HTMLElement>, resourceUuid: string) => {
+                const menuKind = resourceKindToContextMenuKind(resourceUuid);
                 const resource = getResource<GroupResource>(resourceUuid)(this.props.resources);
-                if (resource) {
+                if (menuKind && resource) {
                     this.props.dispatch<any>(openContextMenu(event, {
                         name: '',
                         uuid: resource.uuid,
                         ownerUuid: resource.ownerUuid,
                         isTrashed: resource.isTrashed,
                         kind: resource.kind,
-                        menuKind: ContextMenuKind.PROJECT,
+                        menuKind
                     }));
                 }
+                this.props.dispatch<any>(loadDetailsPanel(resourceUuid));
             }
 
             handleRowDoubleClick = (uuid: string) => {
