aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionGrid
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/collectionGrid')
-rw-r--r--src/client/views/collections/collectionGrid/CollectionGridView.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/collectionGrid/CollectionGridView.tsx b/src/client/views/collections/collectionGrid/CollectionGridView.tsx
index e7f1de7f1..a7603a45b 100644
--- a/src/client/views/collections/collectionGrid/CollectionGridView.tsx
+++ b/src/client/views/collections/collectionGrid/CollectionGridView.tsx
@@ -182,17 +182,17 @@ export class CollectionGridView extends CollectionSubView() {
isChildContentActive = () => (this._props.isDocumentActive?.() && (this._props.childDocumentsActive?.() || BoolCast(this.Document.childDocumentsActive)) ? true : undefined);
/**
*
- * @param layout
+ * @param childLayout
* @param dxf the x- and y-translations of the decorations box as a transform i.e. this.lookupIndividualTransform
* @param width
* @param height
* @returns the `ContentFittingDocumentView` of the node
*/
- getDisplayDoc = (layout: Doc, dxf: () => Transform, width: () => number, height: () => number) => (
+ getDisplayDoc = (childLayout: Doc, dxf: () => Transform, width: () => number, height: () => number) => (
<DocumentView
{...this._props}
- Document={layout}
- TemplateDataDocument={layout.resolvedDataDoc as Doc}
+ Document={childLayout}
+ TemplateDataDocument={childLayout.isTemplateDoc || childLayout.isTemplateForField ? this._props.TemplateDataDocument : undefined}
NativeWidth={returnZero}
NativeHeight={returnZero}
fitWidth={this._props.childLayoutFitWidth}