From cd2b06628e4ea1a714e6352428e50383767cb1ef Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Fri, 12 Jun 2020 09:02:00 -0400 Subject: need a better collectionGRidView fix for when the documentList doesn't match the layout list --- src/client/views/collections/collectionGrid/CollectionGridView.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2