From 43102bc0319a62c0e159da278dd2698164585e73 Mon Sep 17 00:00:00 2001 From: vli18 Date: Thu, 24 Mar 2022 17:41:17 -0400 Subject: updated delete --- .../CollectionNoteTakingViewFieldColumn.tsx | 53 ++++++++++++---------- 1 file changed, 30 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx b/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx index ae0729111..108fed6b7 100644 --- a/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx +++ b/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx @@ -136,9 +136,16 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component { - this.props.docList.forEach(d => d[this.props.pivotField] = undefined); + // this.props.docList.forEach(d => d[this.props.pivotField] = undefined); if (this.props.columnHeaders && this.props.headingObject) { const index = this.props.columnHeaders.indexOf(this.props.headingObject); + if (index > 0) { + const newHeader = this.props.columnHeaders[index - 1]; + this.props.docList.forEach(d => d[this.props.pivotField] = newHeader.heading.toString()) + } else { + // 1 exists because that ensures that we have at least one column (and not the buggy 0 one) + this.props.docList.forEach(d => d[this.props.pivotField] = "1"); + } this.props.columnHeaders.splice(index, 1); } } @@ -297,30 +304,30 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component {this.props.renderChildren(this.props.docList)} - + {!this.props.chromeHidden && type !== DocumentType.PRES ? -
-
- -
-
- -
- +
+
+ +
+
+ +
+
- : null} - + : null} +
} ; -- cgit v1.2.3-70-g09d2