From c469ece08b8df888395b6c1ab8205d3a027853fa Mon Sep 17 00:00:00 2001
From: yipstanley <stanley_yip@brown.edu>
Date: Thu, 7 Mar 2019 22:18:47 -0500
Subject: changing branches

---
 src/client/views/collections/CollectionView.tsx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'src/client/views/collections/CollectionView.tsx')

diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index 90080ab43..18e290477 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -11,6 +11,7 @@ import { CollectionFreeFormView } from "./CollectionFreeFormView";
 import { CollectionDockingView } from "./CollectionDockingView";
 import { CollectionSchemaView } from "./CollectionSchemaView";
 import { CollectionViewProps } from "./CollectionViewBase";
+import { Field } from "../../../fields/Field";
 
 
 
@@ -40,8 +41,12 @@ export class CollectionView extends React.Component<CollectionViewProps> {
     @action
     addDocument = (doc: Document): void => {
         //TODO This won't create the field if it doesn't already exist
-        const value = this.props.Document.GetData(this.props.fieldKey, ListField, new Array<Document>())
-        value.push(doc);
+        let value = this.props.Document.GetData(this.props.fieldKey, ListField, new Array<Document>())
+        value.push(doc)
+        // this.props.Document.GetAsync(this.props.fieldKey, (f: Field) => {
+        //     (f as ListField<Document>).Data.push(doc);
+        //     this.props.Document.SetOnPrototype(KeyStore.Data, (f as ListField<Document>))
+        // })
     }
 
     @action
-- 
cgit v1.2.3-70-g09d2

