diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-08-17 19:51:57 +0800 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-08-17 19:51:57 +0800 |
commit | 1baff66d1fe34a36db4aa5c817f049f4c1b04a1c (patch) | |
tree | 6568fc94fda99f829c91bb6e3d1e279e3ecad824 /src/client/views/collections/CollectionView.tsx | |
parent | 7044fda26b17c0dac007952fb146bc8307339dce (diff) |
bug fixes + new ways of adding pres with view
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
-rw-r--r-- | src/client/views/collections/CollectionView.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index 9d305145e..c030066c9 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -184,6 +184,10 @@ export class CollectionView extends Touchable<FieldViewProps & CollectionViewCus doc.context = this.props.Document; }); added.map(add => Doc.AddDocToList(Cast(Doc.UserDoc().myCatalog, Doc, null), "data", add)); + const myPresentations = Doc.UserDoc().myPresentations as Doc; + added.map(add => { + if (add.type === DocumentType.PRES) Doc.AddDocToList(myPresentations, "data", add); + }); // targetDataDoc[this.props.fieldKey] = new List<Doc>([...docList, ...added]); (targetDataDoc[this.props.fieldKey] as List<Doc>).push(...added); targetDataDoc[this.props.fieldKey + "-lastModified"] = new DateField(new Date(Date.now())); |