aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionBaseView.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-10-21 15:45:51 -0400
committerbob <bcz@cs.brown.edu>2019-10-21 15:45:51 -0400
commit4d02c9b581a22da777232124f2b1a96f8e342285 (patch)
treed9c433f1247ec3bad15c3ecdfdb8c342bcedec54 /src/client/views/collections/CollectionBaseView.tsx
parent9586d1e6bad65070a472da7a067db03f26fe9a4c (diff)
initial simplification to fieldExt
Diffstat (limited to 'src/client/views/collections/CollectionBaseView.tsx')
-rw-r--r--src/client/views/collections/CollectionBaseView.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionBaseView.tsx b/src/client/views/collections/CollectionBaseView.tsx
index 1ade44250..fa543cc01 100644
--- a/src/client/views/collections/CollectionBaseView.tsx
+++ b/src/client/views/collections/CollectionBaseView.tsx
@@ -97,9 +97,11 @@ export class CollectionBaseView extends React.Component<CollectionViewProps> {
@action.bound
addDocument(doc: Doc): boolean {
- let targetDataDoc = this.props.Document;
+ let targetDataDoc = Doc.GetProto(this.props.Document);
let targetField = this.props.fieldKey;
Doc.AddDocToList(targetDataDoc, targetField, doc);
+ let extension = Doc.fieldExtensionDoc(targetDataDoc, targetField);
+ extension && (extension.lastModified = new DateField(new Date(Date.now())));
Doc.GetProto(doc).lastOpened = new DateField;
return true;
}