[ARVADOS-WORKBENCH2] updated: 1.1.4-525-g050a131

Git user git at public.curoverse.com
Mon Aug 6 13:00:43 EDT 2018


Summary of changes:
 .../context-menu/action-sets/collection-files-item-action-set.ts  | 2 +-
 src/views-components/rename-file-dialog/rename-file-dialog.tsx    | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

       via  050a1314bfc30f07c2f871204ca8acd61bb892f9 (commit)
      from  a06392b6e6c0ad1aa9e674b82a068c71ef2fb3a3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 050a1314bfc30f07c2f871204ca8acd61bb892f9
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Mon Aug 6 19:00:27 2018 +0200

    Reset rename dialog on open
    
    Feature #13952
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts b/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts
index 19c9f7c..e24108f 100644
--- a/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts
+++ b/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts
@@ -12,7 +12,7 @@ export const collectionFilesItemActionSet: ContextMenuActionSet = [[{
     name: "Rename",
     icon: RenameIcon,
     execute: (dispatch, resource) => {
-        dispatch(openRenameFileDialog(resource.name));
+        dispatch<any>(openRenameFileDialog(resource.name));
     }
 }, {
     name: "Download",
diff --git a/src/views-components/rename-file-dialog/rename-file-dialog.tsx b/src/views-components/rename-file-dialog/rename-file-dialog.tsx
index 019aea3..6c880cc 100644
--- a/src/views-components/rename-file-dialog/rename-file-dialog.tsx
+++ b/src/views-components/rename-file-dialog/rename-file-dialog.tsx
@@ -2,7 +2,8 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { reduxForm, startSubmit, stopSubmit } from "redux-form";
+import { Dispatch } from "redux";
+import { reduxForm, reset, startSubmit, stopSubmit } from "redux-form";
 import { withDialog } from "../../store/dialog/with-dialog";
 import { dialogActions } from "../../store/dialog/dialog-actions";
 import { RenameDialog } from "../../components/rename-dialog/rename-dialog";
@@ -10,7 +11,10 @@ import { RenameDialog } from "../../components/rename-dialog/rename-dialog";
 export const RENAME_FILE_DIALOG = 'renameFileDialog';
 
 export const openRenameFileDialog = (originalName: string, ) =>
-    dialogActions.OPEN_DIALOG({ id: RENAME_FILE_DIALOG, data: originalName });
+    (dispatch: Dispatch) => {
+        dispatch(reset(RENAME_FILE_DIALOG));
+        dispatch(dialogActions.OPEN_DIALOG({ id: RENAME_FILE_DIALOG, data: originalName }));
+    };
 
 export const [RenameFileDialog] = [RenameDialog]
     .map(withDialog(RENAME_FILE_DIALOG))

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list