diff options
| author | kimdahey <claire_kim1@brown.edu> | 2019-09-10 19:16:59 -0400 |
|---|---|---|
| committer | kimdahey <claire_kim1@brown.edu> | 2019-09-10 19:16:59 -0400 |
| commit | 66d510b95c7e70049df6208dbe91ff4600058b27 (patch) | |
| tree | 8cb061c2dc7b116c0ef4b8bf402c2928388260a3 /src/client/views/collections/CollectionBaseView.tsx | |
| parent | 9b2562906bf3b87f18854dcaab9ad12b19dc3fce (diff) | |
| parent | ec62b213439ab49134fa2dbbdf38a6d1ef5737cd (diff) | |
pulled from master
Diffstat (limited to 'src/client/views/collections/CollectionBaseView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionBaseView.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionBaseView.tsx b/src/client/views/collections/CollectionBaseView.tsx index b6ed6aaa0..bd8d56851 100644 --- a/src/client/views/collections/CollectionBaseView.tsx +++ b/src/client/views/collections/CollectionBaseView.tsx @@ -12,6 +12,7 @@ import { ContextMenu } from '../ContextMenu'; import { FieldViewProps } from '../nodes/FieldView'; import './CollectionBaseView.scss'; import { DateField } from '../../../new_fields/DateField'; +import { DocumentType } from '../../documents/DocumentTypes'; export enum CollectionViewType { Invalid, @@ -103,6 +104,9 @@ export class CollectionBaseView extends React.Component<CollectionViewProps> { if (this.props.fieldExt) { // bcz: fieldExt !== undefined means this is an overlay layer Doc.GetProto(doc).annotationOn = this.props.Document; } + if (doc.type === DocumentType.BUTTON) { + doc.collectionContext = this.props.Document; // used by docList() function in Doc.ts so that buttons can iterate over the documents in their collection + } allowDuplicates = true; let targetDataDoc = this.props.fieldExt || this.props.Document.isTemplate ? this.extensionDoc : this.props.Document; let targetField = (this.props.fieldExt || this.props.Document.isTemplate) && this.props.fieldExt ? this.props.fieldExt : this.props.fieldKey; |
