aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-05-03 15:28:53 -0400
committerbobzel <zzzman@gmail.com>2024-05-03 15:28:53 -0400
commit93ab35c251b399f3e44ab2fa016e2af13df5a53b (patch)
tree08e6a720ef7bd652b74d05d74633b4be9070fc83 /src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
parente77b55c771a2bd3ba49169185edd9ed2099de1c6 (diff)
fixed not having docs being dragged show up in schema view unless it is active.
Diffstat (limited to 'src/client/views/collections/collectionSchema/CollectionSchemaView.tsx')
-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 };
}