Reset rename dialog on open
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-files-item-action-set.ts
index 0b623eca4c9fd24fc1c666cbfde0b01bc27f8e2f..e24108f4d88754fa30e22760e2d993cde0ae6b7f 100644 (file)
@@ -4,26 +4,26 @@
 
 import { ContextMenuActionSet } from "../context-menu-action-set";
 import { RenameIcon, DownloadIcon, RemoveIcon } from "../../../components/icon/icon";
-import { openRemoveDialog } from "../../remove-dialog/remove-dialog";
-import { openRenameDialog } from "../../rename-dialog/rename-dialog";
+import { openRenameFileDialog } from "../../rename-file-dialog/rename-file-dialog";
+import { openFileRemoveDialog } from "../../file-remove-dialog/file-remove-dialog";
 
 
 export const collectionFilesItemActionSet: ContextMenuActionSet = [[{
     name: "Rename",
     icon: RenameIcon,
     execute: (dispatch, resource) => {
-        dispatch(openRenameDialog('the item'));
+        dispatch<any>(openRenameFileDialog(resource.name));
     }
-},{
+}, {
     name: "Download",
     icon: DownloadIcon,
     execute: (dispatch, resource) => {
         return;
     }
-},{
+}, {
     name: "Remove",
     icon: RemoveIcon,
     execute: (dispatch, resource) => {
-        dispatch(openRemoveDialog('selected file'));
+        dispatch(openFileRemoveDialog(resource.uuid));
     }
 }]];