diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-06-14 23:14:20 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-06-14 23:14:20 -0400 |
| commit | 39d2e4a2e70ace7a882d3b3b9d9cf06b4224fa69 (patch) | |
| tree | b97e6634f111053384a4358ca3ae8b4bda810102 /src/client/views/collections/CollectionTreeView.tsx | |
| parent | 5b9d33920858a42319e84eab2c515919feba45ac (diff) | |
changed library to have catalog default to a schema view. fixed dragging to/from catalog to use 'same' and 'alias' as appropriate for dragging in/out.
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionTreeView.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index 8f30e71b6..180bcdd02 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -671,7 +671,11 @@ export class CollectionTreeView extends CollectionSubView<Document, Partial<coll protected onInternalPreDrop = (e: Event, de: DragManager.DropEvent, targetAction: dropActionType) => { const dragData = de.complete.docDragData; - dragData && (dragData.dropAction = this.props.Document[Id] === dragData?.treeViewId ? "same" : dragData.dropAction); + if (dragData) { + if (targetAction && !dragData.draggedDocuments.some(d => d.context === this.props.Document && this.childDocs.includes(d))) { + dragData.dropAction = targetAction; + } else dragData.dropAction = this.props.Document[Id] === dragData?.treeViewId ? "same" : dragData.dropAction; + } } componentWillUnmount() { |
