diff options
author | bob <bcz@cs.brown.edu> | 2019-12-02 15:23:28 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-12-02 15:23:28 -0500 |
commit | 62c888ad25c5580441eaf947a1a0f1638939b868 (patch) | |
tree | 41a67734a57723325def2a6ce0aeb5fb2e5e7576 /src | |
parent | 59ab8a05866bbf065aa5078029a7bef1ebb708df (diff) |
fixed aliasing dragged documents that stay within the same tree view. (eg, the library of documents view).
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionTreeView.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index 83f09b8e9..c4b7e2d31 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -233,7 +233,7 @@ class TreeView extends React.Component<TreeViewProps> { addDoc = (doc: Doc) => Doc.AddDocToList(this.dataDoc, this.fieldKey, doc) || addDoc(doc); } let movedDocs = (de.data.options === this.props.treeViewId ? de.data.draggedDocuments : de.data.droppedDocuments); - return (de.data.dropAction || de.data.userDropAction) ? + return ((de.data.dropAction && (de.data.options !== this.props.treeViewId)) || de.data.userDropAction) ? de.data.droppedDocuments.reduce((added, d) => addDoc(d) || added, false) : de.data.moveDocument ? movedDocs.reduce((added, d) => de.data.moveDocument(d, undefined, addDoc) || added, false) |