diff options
author | ljungster <parkerljung@gmail.com> | 2022-08-11 07:37:03 -0500 |
---|---|---|
committer | ljungster <parkerljung@gmail.com> | 2022-08-11 07:37:03 -0500 |
commit | 92ccfc514a15b03e5a1c0cb7ccbe9c1fe5ce82ad (patch) | |
tree | e830dc058aabafdc85fcc297d4d0fd2420b20674 /src | |
parent | da3cb00f809a482a9fdf732f6a656fbc467cce27 (diff) |
cc
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionNoteTakingViewColumn.tsx | 19 |
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) => { |