20031: Avoid expanding pre-selected picker tree item until loaded
authorStephen Smith <stephen@curii.com>
Wed, 24 May 2023 13:38:19 +0000 (09:38 -0400)
committerStephen Smith <stephen@curii.com>
Wed, 24 May 2023 13:38:19 +0000 (09:38 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/store/collections/collection-partial-copy-actions.ts
src/store/tree-picker/tree-picker-actions.ts

index 8e8dbdbba5ed81dc5302500111fb8679ed3d3290..7897efc450a8e995c7701786e910663cf4311eaa 100644 (file)
@@ -4,7 +4,7 @@
 
 import { Dispatch } from 'redux';
 import { RootState } from 'store/store';
-import { FormErrors, initialize, startSubmit, stopSubmit } from 'redux-form';
+import { initialize, startSubmit, stopSubmit } from 'redux-form';
 import { resetPickerProjectTree } from 'store/project-tree-picker/project-tree-picker-actions';
 import { dialogActions } from 'store/dialog/dialog-actions';
 import { ServiceRepository } from 'services/services';
index bf40394c8c1e77ee44fd46a1ee28043f2bdd3814..ad657f14e6281da0ccc185be29f1734195d748f4 100644 (file)
@@ -311,7 +311,6 @@ export const loadInitialValue = (initialValue: string, pickerId: string) =>
                     pickerId: pickerTreeId,
                     subtree: tree
                 }));
-            dispatch(treePickerActions.EXPAND_TREE_PICKER_NODES({ ids: [pickerTreeRootUuid], pickerId: pickerTreeId }));
             dispatch(treePickerActions.ACTIVATE_TREE_PICKER_NODE({ id: initialValue, pickerId: pickerTreeId }));
             dispatch(treePickerSearchActions.REFRESH_TREE_PICKER({ pickerId: pickerTreeId }));
         }
@@ -561,7 +560,7 @@ export const createInitialLocationTree = (data: Array<GroupResource | Collection
             value: item,
             active: false,
             selected: false,
-            expanded: item.uuid !== tailUuid,
+            expanded: false,
             status: item.uuid !== tailUuid ? TreeNodeStatus.LOADED : TreeNodeStatus.INITIAL,
         })(tree), createTree<GroupResource | CollectionResource>());
 };