diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-06-12 09:02:00 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-06-12 09:02:00 -0400 |
commit | cd2b06628e4ea1a714e6352428e50383767cb1ef (patch) | |
tree | 6e1c39792506d967af7b9925aa9572e3e4761daf | |
parent | 8e2b01cc8f302d509ce0234abbe36c5d9637ab38 (diff) |
need a better collectionGRidView fix for when the documentList doesn't match the layout list
-rw-r--r-- | src/client/views/collections/collectionGrid/CollectionGridView.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionGrid/CollectionGridView.tsx b/src/client/views/collections/collectionGrid/CollectionGridView.tsx index ec142f7a5..4b9365838 100644 --- a/src/client/views/collections/collectionGrid/CollectionGridView.tsx +++ b/src/client/views/collections/collectionGrid/CollectionGridView.tsx @@ -197,9 +197,7 @@ export class CollectionGridView extends CollectionSubView(GridSchema) { private get contents(): JSX.Element[] { const collector: JSX.Element[] = []; const layouts = this.parsedLayoutList; - if (layouts.length !== this.childLayoutPairs.length) { - setTimeout(action(() => this.props.Document.gridResetLayout = true), 0); - } else { + if (layouts.length == this.childLayoutPairs.length) { this.layoutList.forEach((l, i) => { const child = this.childLayoutPairs.find(c => c.layout[Id] === l.i); const dxf = () => this.lookupIndividualTransform(layouts[i]); @@ -229,6 +227,7 @@ export class CollectionGridView extends CollectionSubView(GridSchema) { this.parsedLayoutList.map((layout, index) => Object.assign(layout, this.unflexedPosition(index))); } + @action onInternalDrop = (e: Event, de: DragManager.DropEvent) => { const layouts = this.parsedLayoutList; const dropped = de.complete.docDragData?.droppedDocuments; |