aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionNoteTakingViewColumn.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-12-01 02:33:04 -0500
committerbobzel <zzzman@gmail.com>2023-12-01 02:33:04 -0500
commit9ae07e29f41df9d64985c25b67054843a99a0224 (patch)
tree092fc2062bbca4c6d59cb6c49e977197addf5556 /src/client/views/collections/CollectionNoteTakingViewColumn.tsx
parent0e9f8ceceeca5bca7888cb611afb4d2b9963d5ae (diff)
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.
Diffstat (limited to 'src/client/views/collections/CollectionNoteTakingViewColumn.tsx')
-rw-r--r--src/client/views/collections/CollectionNoteTakingViewColumn.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingViewColumn.tsx b/src/client/views/collections/CollectionNoteTakingViewColumn.tsx
index 52cc21903..9e5f09479 100644
--- a/src/client/views/collections/CollectionNoteTakingViewColumn.tsx
+++ b/src/client/views/collections/CollectionNoteTakingViewColumn.tsx
@@ -25,7 +25,7 @@ import './CollectionNoteTakingView.scss';
interface CSVFieldColumnProps {
Document: Doc;
- DataDoc: Opt<Doc>;
+ TemplateDataDocument: Opt<Doc>;
docList: Doc[];
heading: string;
pivotField: string;
@@ -134,7 +134,7 @@ export class CollectionNoteTakingViewColumn extends React.Component<CSVFieldColu
const newDoc = Docs.Create.TextDocument(value, { _height: 18, _width: 200, _layout_fitWidth: true, title: value, _layout_autoHeight: true });
const colValue = this.getValue(this.props.heading);
newDoc[key] = colValue;
- FormattedTextBox.SelectOnLoad = newDoc[Id];
+ FormattedTextBox.SetSelectOnLoad(newDoc);
FormattedTextBox.SelectOnLoadChar = forceEmptyNote ? '' : ' ';
return this.props.addDocument?.(newDoc) || false;
};
@@ -157,14 +157,14 @@ export class CollectionNoteTakingViewColumn extends React.Component<CSVFieldColu
ContextMenu.Instance.clearItems();
const layoutItems: ContextMenuProps[] = [];
const docItems: ContextMenuProps[] = [];
- const dataDoc = this.props.DataDoc || this.props.Document;
+ const dataDoc = this.props.TemplateDataDocument || this.props.Document;
const pivotValue = this.getValue(this.props.heading);
DocUtils.addDocumentCreatorMenuItems(
doc => {
const key = this.props.pivotField;
doc[key] = this.getValue(this.props.heading);
- FormattedTextBox.SelectOnLoad = doc[Id];
+ FormattedTextBox.SetSelectOnLoad(doc);
return this.props.addDocument?.(doc);
},
this.props.addDocument,