aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionNoteTakingViewColumn.tsx
diff options
context:
space:
mode:
authorljungster <parkerljung@gmail.com>2022-08-19 06:48:46 -0500
committerljungster <parkerljung@gmail.com>2022-08-19 06:48:46 -0500
commit5655589d46c01af74c959c2d365d3eeb15feb407 (patch)
treea79952087f8d51023b8d5da1caa6103117cb2673 /src/client/views/collections/CollectionNoteTakingViewColumn.tsx
parent6f7a94b0fa65729f03b49e8aecf9eb3c8a2461ff (diff)
persistent resizing undo/redo issues
Diffstat (limited to 'src/client/views/collections/CollectionNoteTakingViewColumn.tsx')
-rw-r--r--src/client/views/collections/CollectionNoteTakingViewColumn.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingViewColumn.tsx b/src/client/views/collections/CollectionNoteTakingViewColumn.tsx
index 8ad684cec..11a0e69ac 100644
--- a/src/client/views/collections/CollectionNoteTakingViewColumn.tsx
+++ b/src/client/views/collections/CollectionNoteTakingViewColumn.tsx
@@ -51,7 +51,7 @@ interface CSVFieldColumnProps {
unobserveHeight: (myref: any) => void;
//setDraggedCol:(clonedDiv:any, header:SchemaHeaderField, xycoors: )
editableViewProps: () => any;
- resizeColumns: (n: number, isAdd: boolean) => void;
+ resizeColumns: (isAdd: boolean, colWidth: number, colIndex: number) => boolean;
// columnStartXCoords: number[];
PanelWidth: number;
maxColWidth: number;
@@ -165,8 +165,10 @@ export class CollectionNoteTakingViewColumn extends React.Component<CSVFieldColu
if (columnHeaders && this.props.headingObject) {
const index = columnHeaders.indexOf(this.props.headingObject);
this.props.docList.forEach(d => (d[this.props.pivotField] = 'unset'));
- this.props.resizeColumns(columnHeaders.length - 1, false)
+ // should never be 0, currently placeholder
+ const colWidth = this.props.columnHeaders ? this.props.columnHeaders[index].width : 0;
columnHeaders.splice(index, 1);
+ this.props.resizeColumns(false, colWidth, index);
}
};