aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/SchemaTable.tsx
diff options
context:
space:
mode:
authordg314 <david_grossman@brown.edu>2021-07-17 15:13:39 -0400
committerdg314 <david_grossman@brown.edu>2021-07-17 15:13:39 -0400
commit48dbde117728e4b36bae11f0f16a796059ecf7ee (patch)
tree90ed4c780c7afaa612e4a4c916121bd875ba6259 /src/client/views/collections/SchemaTable.tsx
parent4cb75250bacbd08f4ae2c6ef6b4a00472bc890c3 (diff)
initial search panel
Diffstat (limited to 'src/client/views/collections/SchemaTable.tsx')
-rw-r--r--src/client/views/collections/SchemaTable.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx
index 0c69ee030..0175b0dc2 100644
--- a/src/client/views/collections/SchemaTable.tsx
+++ b/src/client/views/collections/SchemaTable.tsx
@@ -196,6 +196,7 @@ export class SchemaTable extends React.Component<SchemaTableProps> {
<div onClick={e => this.changeSorting(col)} style={{ width: 21, padding: 1, display: "inline", zIndex: 1, background: "inherit", cursor: "hand" }}>
<FontAwesomeIcon icon={sortIcon} size="lg" />
</div>
+ {this.props.Document._chromeHidden || this.props.addDocument == returnFalse ? undefined : <div className="collectionSchemaView-addRow" onClick={this.createRow}>+ new</div>}
</div>;
return {
@@ -559,7 +560,7 @@ export class SchemaTable extends React.Component<SchemaTableProps> {
onPointerDown={this.props.onPointerDown} onClick={this.props.onClick} onWheel={e => this.props.active(true) && e.stopPropagation()}
onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} >
{this.reactTable}
- {this.props.Document._chromeHidden ? undefined : <div className="collectionSchemaView-addRow" onClick={this.createRow}>+ new</div>}
+ {this.props.Document._chromeHidden || this.props.addDocument == returnFalse ? undefined : <div className="collectionSchemaView-addRow" onClick={this.createRow}>+ new</div>}
{!this._showDoc ? (null) :
<div className="collectionSchemaView-documentPreview" ref="overlay"
style={{