aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx
diff options
context:
space:
mode:
authorljungster <parkerljung@gmail.com>2022-05-07 08:23:27 -0400
committerljungster <parkerljung@gmail.com>2022-05-07 08:23:27 -0400
commit63c0023b5d1bde23ee0d9a1209c8cfda240649f9 (patch)
tree7a5d82e026946ae3e4d165c707ba16a9ad5118fa /src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx
parent2b94b7101f2f5d9700a499975bd4978b284b0689 (diff)
fixed wrong column bug
Diffstat (limited to 'src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx')
-rw-r--r--src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx b/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx
index 1167a0ea8..8b7461fc0 100644
--- a/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx
+++ b/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx
@@ -187,11 +187,14 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component<CSVFiel
const layoutItems: ContextMenuProps[] = [];
const docItems: ContextMenuProps[] = [];
const dataDoc = this.props.DataDoc || 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];
return this.props.addDocument?.(doc);
- }, this.props.addDocument, x, y, true);
+ }, this.props.addDocument, x, y, true, this.props.pivotField, pivotValue);
Array.from(Object.keys(Doc.GetProto(dataDoc))).filter(fieldKey => dataDoc[fieldKey] instanceof RichTextField || dataDoc[fieldKey] instanceof ImageField || typeof (dataDoc[fieldKey]) === "string").map(fieldKey =>
docItems.push({