aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionMasonryViewFieldRow.tsx
diff options
context:
space:
mode:
authoreeng5 <eleanor_eng@brown.edu>2019-08-27 11:53:00 -0400
committereeng5 <eleanor_eng@brown.edu>2019-08-27 11:53:00 -0400
commit5a7ec36e558bdf5333cb7c16faad8f31bfcf314e (patch)
tree437c7fca086fc760cf5ea2b2736ecb1ded96144b /src/client/views/collections/CollectionMasonryViewFieldRow.tsx
parent25d9d8d9a1fdd38fd27cf77e0385b7482fc8f4a8 (diff)
fixed autoheight for masonry
Diffstat (limited to 'src/client/views/collections/CollectionMasonryViewFieldRow.tsx')
-rw-r--r--src/client/views/collections/CollectionMasonryViewFieldRow.tsx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionMasonryViewFieldRow.tsx b/src/client/views/collections/CollectionMasonryViewFieldRow.tsx
index bae2a1ff4..1c1e44bb5 100644
--- a/src/client/views/collections/CollectionMasonryViewFieldRow.tsx
+++ b/src/client/views/collections/CollectionMasonryViewFieldRow.tsx
@@ -33,7 +33,6 @@ interface CMVFieldRowProps {
type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | undefined;
createDropTarget: (ele: HTMLDivElement) => void;
screenToLocalTransform: () => Transform;
- color: string | undefined;
}
@observer
@@ -274,7 +273,7 @@ export class CollectionMasonryViewFieldRow extends React.Component<CMVFieldRowPr
HeadingObject: this.props.headingObject,
HeadingsHack: this._headingsHack,
toggle: this.toggleVisibility,
- color: this.props.color
+ color: this._color
};
let newEditableViewProps = {
GetValue: () => "",
@@ -283,10 +282,10 @@ export class CollectionMasonryViewFieldRow extends React.Component<CMVFieldRowPr
HeadingObject: this.props.headingObject,
HeadingsHack: this._headingsHack,
toggle: this.toggleVisibility,
- color: this.props.color
+ color: this._color
};
- let headingView =
- <div className="collectionStackingView-sectionHeader">
+ let headingView = this.props.headingObject ?
+ <div className="collectionStackingView-sectionHeader" ref={this._headerRef} >
<div className="collectionStackingView-sectionHeader-subCont" onPointerDown={this.headerDown}
title={evContents === `NO ${key.toUpperCase()} VALUE` ?
`Documents that don't have a ${key} value will go here. This column cannot be removed.` : ""}
@@ -311,11 +310,11 @@ export class CollectionMasonryViewFieldRow extends React.Component<CMVFieldRowPr
<FontAwesomeIcon icon="trash" />
</button>}
</div>
- </div >;
+ </div > : (null);
return (
<div className="collectionStackingView-masonrySection"
key={heading = "empty"}
- style={{ width: this.props.parent.NodeWidth }}
+ style={{ width: this.props.parent.NodeWidth, background: this._background }}
ref={this.createRowDropRef}
onPointerEnter={this.pointerEnteredRow}
onPointerLeave={this.pointerLeaveRow}