aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/collectionSchema')
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index 023b72778..b684b65e5 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -1014,9 +1014,10 @@ export class CollectionSchemaView extends CollectionSubView() {
};
@computed get sortedDocs() {
+ const draggedDocs = this.isContentActive() ? DragManager.docsBeingDragged : [];
const field = StrCast(this.layoutDoc.sortField);
const desc = BoolCast(this.layoutDoc.sortDesc); // is this an ascending or descending sort
- const staticDocs = this.childDocs.filter(d => !DragManager.docsBeingDragged.includes(d));
+ const staticDocs = this.childDocs.filter(d => !draggedDocs.includes(d));
const docs = !field
? staticDocs
: [...staticDocs].sort((docA, docB) => {
@@ -1030,7 +1031,7 @@ export class CollectionSchemaView extends CollectionSubView() {
return out;
});
- docs.splice(this.rowDropIndex, 0, ...DragManager.docsBeingDragged);
+ docs.splice(this.rowDropIndex, 0, ...draggedDocs);
return { docs };
}