From a794da35a96ba278e20a76591de86cac6ce44969 Mon Sep 17 00:00:00 2001
From: madelinegr <mgriswold99@gmail.com>
Date: Thu, 6 Jun 2019 16:08:18 -0400
Subject: Grouping done

---
 src/client/views/presentationview/PresentationView.tsx | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'src/client/views/presentationview/PresentationView.tsx')

diff --git a/src/client/views/presentationview/PresentationView.tsx b/src/client/views/presentationview/PresentationView.tsx
index 6cf908d01..79b7c1f15 100644
--- a/src/client/views/presentationview/PresentationView.tsx
+++ b/src/client/views/presentationview/PresentationView.tsx
@@ -62,6 +62,16 @@ class PresentationViewList extends React.Component<PresListProps> {
         });
     }
 
+    @action
+    initializeGroupIds = (docList: Doc[]) => {
+        docList.forEach((doc: Doc, index: number) => {
+            let docGuid = StrCast(doc.presentId, null);
+            if (docGuid === undefined) {
+                doc.presentId = Utils.GenerateGuid();
+            }
+        });
+    }
+
     // /**
     //  * Renders a single child document. It will just append a list element.
     //  * @param document The document to render.
@@ -109,6 +119,7 @@ class PresentationViewList extends React.Component<PresListProps> {
     render() {
         const children = DocListCast(this.props.Document.data);
         this.initializeGroupArrays(children);
+        this.initializeGroupIds(children);
 
         return (
             <div className="presentationView-listCont">
-- 
cgit v1.2.3-70-g09d2

