From 9ae07e29f41df9d64985c25b67054843a99a0224 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 1 Dec 2023 02:33:04 -0500 Subject: converted props.DataDoc to props.TemplateDataDocument and fixed so that it's always undefined unless it's a template. converted references from rootDocument to props.TemplateDataDocument. --- .../views/collections/CollectionStackingViewFieldColumn.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client/views/collections/CollectionStackingViewFieldColumn.tsx') diff --git a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx index 3598d548a..9bd412fb8 100644 --- a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx +++ b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx @@ -26,7 +26,7 @@ import { Id } from '../../../fields/FieldSymbols'; // So this is how we are storing a column interface CSVFieldColumnProps { Document: Doc; - DataDoc: Opt; + TemplateDataDocument: Opt; docList: Doc[]; heading: string; pivotField: string; @@ -137,7 +137,7 @@ export class CollectionStackingViewFieldColumn extends React.Component (NumCast(doc.heading) > maxHeading ? NumCast(doc.heading) : maxHeading), 0); const heading = maxHeading === 0 || this.props.docList.length === 0 ? 1 : maxHeading === 1 ? 2 : 3; newDoc.heading = heading; - FormattedTextBox.SelectOnLoad = newDoc[Id]; + FormattedTextBox.SetSelectOnLoad(newDoc); FormattedTextBox.SelectOnLoadChar = forceEmptyNote ? '' : ' '; return this.props.addDocument?.(newDoc) || false; }; @@ -211,12 +211,12 @@ export class CollectionStackingViewFieldColumn extends React.Component { - FormattedTextBox.SelectOnLoad = doc[Id]; + FormattedTextBox.SetSelectOnLoad(doc); return this.props.addDocument?.(doc); }, this.props.addDocument, -- cgit v1.2.3-70-g09d2