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.tsx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx b/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx
index b9bed7174..55cfa3348 100644
--- a/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx
+++ b/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx
@@ -59,7 +59,6 @@ interface CSVFieldColumnProps {
export class CollectionNoteTakingViewFieldColumn extends React.Component<CSVFieldColumnProps> {
@observable private _background = "inherit";
- // It seems like this is being a little funky atm
@computed get columnWidth() {
// base cases
if (!this.props.columnHeaders || !this.props.headingObject || this.props.columnHeaders.length == 1) {
@@ -70,7 +69,8 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component<CSVFiel
return this.props.maxColWidth
}
const endColValue = i == this.props.numGroupColumns - 1 ? this.props.PanelWidth : this.props.columnStartXCoords[i+1]
- return endColValue - this.props.columnStartXCoords[i] - 10
+ // 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] - 35
}
private dropDisposer?: DragManager.DragDropDisposer;
@@ -312,14 +312,12 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component<CSVFiel
render() {
TraceMobx();
- const headings = this.props.headings();
const heading = this._heading;
- const uniqueHeadings = headings.map((i, idx) => headings.indexOf(i) === idx);
return (
<div className={"collectionNoteTakingViewFieldColumn" + (SnappingManager.GetIsDragging() ? "Dragging" : "")} key={heading}
style={{
//TODO: change this so that it's based on the column width
- width: `${100 / (uniqueHeadings.length || 1)}%`,
+ width: this.columnWidth,
height: "100%",
background: this._background
}}