aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionNoteTakingViewColumn.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/CollectionNoteTakingViewColumn.tsx')
-rw-r--r--src/client/views/collections/CollectionNoteTakingViewColumn.tsx19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingViewColumn.tsx b/src/client/views/collections/CollectionNoteTakingViewColumn.tsx
index 4286da2e2..f58d8e937 100644
--- a/src/client/views/collections/CollectionNoteTakingViewColumn.tsx
+++ b/src/client/views/collections/CollectionNoteTakingViewColumn.tsx
@@ -51,8 +51,8 @@ interface CSVFieldColumnProps {
unobserveHeight: (myref: any) => void;
//setDraggedCol:(clonedDiv:any, header:SchemaHeaderField, xycoors: )
editableViewProps: () => any;
- resizeColumns: (n: number) => void;
- columnStartXCoords: number[];
+ // resizeColumns: (n: number) => void;
+ // columnStartXCoords: number[];
PanelWidth: number;
maxColWidth: number;
// docsByColumnHeader: Map<string, Doc[]>
@@ -69,12 +69,16 @@ export class CollectionNoteTakingViewColumn extends React.Component<CSVFieldColu
return this.props.maxColWidth;
}
const i = this.props.columnHeaders.indexOf(this.props.headingObject);
- if (i < 0 || i > this.props.columnStartXCoords.length - 1) {
- return this.props.maxColWidth;
+ if (i >= 0 && this.props.columnHeaders[i].width > 0) {
+ return this.props.columnHeaders[i].width;
}
- const endColValue = i == this.props.numGroupColumns - 1 ? this.props.PanelWidth : this.props.columnStartXCoords[i + 1];
- // TODO make the math work here. 35 is half of 70, which is the current width of the divider
- return endColValue - this.props.columnStartXCoords[i] - 30;
+ return this.props.maxColWidth;
+ // if (i < 0 || i > this.props.columnStartXCoords.length - 1) {
+ // return this.props.maxColWidth;
+ // }
+ // const endColValue = i == this.props.numGroupColumns - 1 ? this.props.PanelWidth : this.props.columnStartXCoords[i + 1];
+ // // TODO make the math work here. 35 is half of 70, which is the current width of the divider
+ // return endColValue - this.props.columnStartXCoords[i] - 30;
}
private dropDisposer?: DragManager.DragDropDisposer;
@@ -156,6 +160,7 @@ export class CollectionNoteTakingViewColumn extends React.Component<CSVFieldColu
this.props.docList.forEach(d => (d[this.props.pivotField] = 'unset'));
columnHeaders.splice(index, 1);
}
+ // probably need to add something here for sizing purposes
};
menuCallback = (x: number, y: number) => {