[ARVADOS-WORKBENCH2] created: 1.2.0-741-ga459a37
Git user
git at public.curoverse.com
Fri Oct 26 02:56:51 EDT 2018
at a459a376f98f7cb8741c8ab1057c9578e59dc327 (commit)
commit a459a376f98f7cb8741c8ab1057c9578e59dc327
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date: Fri Oct 26 08:56:44 2018 +0200
Fix setting empty field on file rename
Feature #14351
Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>
diff --git a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
index 9a1d645..e441959 100644
--- a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
+++ b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
@@ -11,7 +11,7 @@ import { snackbarActions } from "../../snackbar/snackbar-actions";
import { dialogActions } from '../../dialog/dialog-actions';
import { getNodeValue } from "~/models/tree";
import { filterCollectionFilesBySelection } from './collection-panel-files-state';
-import { startSubmit, stopSubmit, reset } from 'redux-form';
+import { startSubmit, stopSubmit, reset, initialize } from 'redux-form';
import { getDialog } from "~/store/dialog/dialog-reducer";
import { getFileFullPath } from "~/services/collection-service/collection-service-files-response";
import { resourcesDataActions } from "~/store/resources-data/resources-data-actions";
@@ -96,7 +96,7 @@ export interface RenameFileDialogData {
export const openRenameFileDialog = (data: RenameFileDialogData) =>
(dispatch: Dispatch) => {
- dispatch(reset(RENAME_FILE_DIALOG));
+ dispatch(initialize(RENAME_FILE_DIALOG, data));
dispatch(dialogActions.OPEN_DIALOG({ id: RENAME_FILE_DIALOG, data }));
};
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 0abdb5d..9e276ad 100644
--- a/src/views-components/rename-file-dialog/rename-file-dialog.tsx
+++ b/src/views-components/rename-file-dialog/rename-file-dialog.tsx
@@ -35,6 +35,7 @@ const RenameDialogFormFields = (props: WithDialogProps<RenameFileDialogData>) =>
<Field
name='name'
component={TextField}
+ autoFocus={true}
/>
<WarningCollection text="Renaming a file will change content adress." />
</>;
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list