aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema/SchemaTable.tsx
diff options
context:
space:
mode:
authorGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2021-08-17 21:34:17 -0400
committerGitHub <noreply@github.com>2021-08-17 21:34:17 -0400
commitcf2ab7fe45c57720eeeeff64ed6f5b2b5d8fa40d (patch)
treea8c1236cf6d686dd1b197e11f7bbd6f24f8f89e2 /src/client/views/collections/collectionSchema/SchemaTable.tsx
parent412ec3b38b2ee396b2709d824f02b0e417f5d967 (diff)
parent3b820202841a586506604db776e73a6cdc8d4015 (diff)
Merge pull request #26 from brown-dash/search-david
Search david
Diffstat (limited to 'src/client/views/collections/collectionSchema/SchemaTable.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/SchemaTable.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaTable.tsx b/src/client/views/collections/collectionSchema/SchemaTable.tsx
index de08c327a..abe549072 100644
--- a/src/client/views/collections/collectionSchema/SchemaTable.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaTable.tsx
@@ -197,6 +197,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 {
@@ -561,7 +562,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={{