From 93ab35c251b399f3e44ab2fa016e2af13df5a53b Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 3 May 2024 15:28:53 -0400 Subject: fixed not having docs being dragged show up in schema view unless it is active. --- .../views/collections/collectionSchema/CollectionSchemaView.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/client/views/collections/collectionSchema') 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 }; } -- cgit v1.2.3-70-g09d2