diff options
| author | yipstanley <stanley_yip@brown.edu> | 2019-03-07 22:18:47 -0500 |
|---|---|---|
| committer | yipstanley <stanley_yip@brown.edu> | 2019-03-07 22:18:47 -0500 |
| commit | c469ece08b8df888395b6c1ab8205d3a027853fa (patch) | |
| tree | b81e2d92ac2fd71a56032aa98621ba192bcd5742 /src/client/views/collections/CollectionView.tsx | |
| parent | 59cc888c8bf0559c50e12fd2774ea5ac4ebb3059 (diff) | |
changing branches
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionView.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
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 |
