From 92ccfc514a15b03e5a1c0cb7ccbe9c1fe5ce82ad Mon Sep 17 00:00:00 2001 From: ljungster Date: Thu, 11 Aug 2022 07:37:03 -0500 Subject: cc --- .../collections/CollectionNoteTakingViewColumn.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src') 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 @@ -69,12 +69,16 @@ export class CollectionNoteTakingViewColumn extends React.Component 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 (d[this.props.pivotField] = 'unset')); columnHeaders.splice(index, 1); } + // probably need to add something here for sizing purposes }; menuCallback = (x: number, y: number) => { -- cgit v1.2.3-70-g09d2