aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx')
-rw-r--r--src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx b/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx
index b4e0aac60..452af2ddf 100644
--- a/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx
+++ b/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx
@@ -119,9 +119,10 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component<CSVFiel
const key = this.props.pivotField;
const newDoc = Docs.Create.TextDocument(value, { _height: 18, _width: 200, _fitWidth: true, title: value, _autoHeight: true });
newDoc[key] = this.getValue(this.props.heading);
- const maxHeading = this.props.docList.reduce((maxHeading, doc) => 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;
+ // TODO not sure why we have all of this "maxHeading stuff"
+ // const maxHeading = this.props.docList.reduce((maxHeading, doc) => 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.SelectOnLoadChar = forceEmptyNote ? "" : " ";
return this.props.addDocument?.(newDoc) || false;
@@ -132,11 +133,6 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component<CSVFiel
if (!this.props.columnHeaders) {
return
}
- if (this.props.columnHeaders.length == 1) {
- alert("You can't delete the last column! Going to remove delete button soon")
- return
- }
-
if (this.props.headingObject) {
const index = this.props.columnHeaders.indexOf(this.props.headingObject);
const newIndex = index == 0 ? 1 : index - 1
@@ -303,9 +299,9 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component<CSVFiel
return (
<div className={"collectionNoteTakingViewFieldColumn" + (SnappingManager.GetIsDragging() ? "Dragging" : "")} key={heading}
style={{
- //TODO: change this to be slightly different
+ //TODO: change this so that it's based on the column width
width: `${100 / (uniqueHeadings.length || 1)}%`,
- height: undefined, // DraggingManager.GetIsDragging() ? "100%" : undefined,
+ height: "100%",
background: this._background
}}
ref={this.createColumnDropRef} onPointerEnter={this.pointerEntered} onPointerLeave={this.pointerLeave}>