refs #13632 Merge branch '13632-collections-service'
[arvados-workbench2.git] / src / views / data-explorer / data-explorer.tsx
index baeb946c7182b3e2a6d1f8707a45c0371839b7ea..f4ee36f3b4af2542add0564b6405a075d1e38eaf 100644 (file)
@@ -11,9 +11,9 @@ import { connect, DispatchProp } from 'react-redux';
 import { push } from 'react-router-redux';
 import projectActions from "../../store/project/project-action";
 import { DataColumns } from "../../components/data-table/data-table";
-import { DataItem } from "../../views-components/data-explorer/data-item";
-import DataExplorer from "../../views-components/data-explorer/data-explorer";
+import DataExplorer, { DataExplorerContextActions } from "../../views-components/data-explorer/data-explorer";
 import { mapProjectTreeItem } from "./data-explorer-selectors";
+import { DataItem } from "../../views-components/data-explorer/data-item";
 
 interface DataExplorerViewDataProps {
     projects: ProjectState;
@@ -31,12 +31,23 @@ class DataExplorerView extends React.Component<DataExplorerViewProps, DataExplor
             <DataExplorer
                 items={projectItems.map(mapProjectTreeItem)}
                 onItemClick={this.goToProject}
+                contextActions={this.contextActions}
             />
         );
     }
 
+    contextActions: DataExplorerContextActions = {
+        onAddToFavourite: console.log,
+        onCopy: console.log,
+        onDownload: console.log,
+        onMoveTo: console.log,
+        onRemove: console.log,
+        onRename: console.log,
+        onShare: console.log
+    };
+
     goToProject = (item: DataItem) => {
-        this.props.dispatch(push(`/project/${item.uuid}`));
+        this.props.dispatch(push(`/project/${item}`));
         this.props.dispatch(projectActions.TOGGLE_PROJECT_TREE_ITEM(item.uuid));
     }
 }