X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/67d63d61aa5a1f1bc1bb85bf6b788e6c0d21e298..838af71bfe460c7f5a03121acf8a4d239893cdac:/src/views-components/move-to-dialog/move-to-dialog.tsx

diff --git a/src/views-components/move-to-dialog/move-to-dialog.tsx b/src/views-components/move-to-dialog/move-to-dialog.tsx
index 9c3a6bff9b..dbc402b0f4 100644
--- a/src/views-components/move-to-dialog/move-to-dialog.tsx
+++ b/src/views-components/move-to-dialog/move-to-dialog.tsx
@@ -2,25 +2,28 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { Dispatch } from "redux";
+import { Dispatch, compose } from "redux";
 import { withDialog } from "../../store/dialog/with-dialog";
 import { dialogActions } from "../../store/dialog/dialog-actions";
 import { MoveToDialog } from "../../components/move-to-dialog/move-to-dialog";
 import { reduxForm, startSubmit, stopSubmit } from "redux-form";
+import { resetPickerProjectTree } from "~/store/project-tree-picker/project-tree-picker-actions";
 
 export const MOVE_TO_DIALOG = 'moveToDialog';
 
 export const openMoveToDialog = () =>
     (dispatch: Dispatch) => {
-        dispatch(dialogActions.OPEN_DIALOG({ id: MOVE_TO_DIALOG, data: {}}));
+        dispatch<any>(resetPickerProjectTree());
+        dispatch(dialogActions.OPEN_DIALOG({ id: MOVE_TO_DIALOG, data: {} }));
     };
 
-export const [MoveToProjectDialog] = [MoveToDialog]
-    .map(withDialog(MOVE_TO_DIALOG))
-    .map(reduxForm({
+export const MoveToProjectDialog = compose(
+    withDialog(MOVE_TO_DIALOG),
+    reduxForm({
         form: MOVE_TO_DIALOG,
         onSubmit: (data, dispatch) => {
             dispatch(startSubmit(MOVE_TO_DIALOG));
             setTimeout(() => dispatch(stopSubmit(MOVE_TO_DIALOG, { name: 'Invalid path' })), 2000);
         }
-    }));
\ No newline at end of file
+    })
+)(MoveToDialog);
