From 7a08e2b50696dd1063fa9ad323c8fca5c2fc5886 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 7 Sep 2023 01:49:06 -0400
Subject: hide schema chrome when chromeHidden is set.  ignore showTitle in
 schemaView

---
 .../collectionSchema/CollectionSchemaView.tsx      | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

(limited to 'src/client/views/collections/collectionSchema/CollectionSchemaView.tsx')

diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index 513bbc3fe..182a33fd1 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -869,16 +869,18 @@ export class CollectionSchemaView extends CollectionSubView() {
                     {this._columnMenuIndex !== undefined && this.renderColumnMenu}
                     {this._filterColumnIndex !== undefined && this.renderFilterMenu}
                     <CollectionSchemaViewDocs schema={this} childDocs={this.sortedDocsFunc} rowHeight={this.rowHeightFunc} setRef={(ref: HTMLDivElement | null) => (this._tableContentRef = ref)} />
-                    <div className="schema-add">
-                        <EditableView
-                            GetValue={returnEmptyString}
-                            SetValue={undoable(value => (value ? this.addRow(Docs.Create.TextDocument(value, { title: value, _layout_autoHeight: true })) : false), 'add text doc')}
-                            placeholder={"Type text to create note or ':' to create specific type"}
-                            contents={'+ New Node'}
-                            menuCallback={this.menuCallback}
-                            height={CollectionSchemaView._newNodeInputHeight}
-                        />
-                    </div>
+                    {!this.layoutDoc.chromeHidden ? null : (
+                        <div className="schema-add">
+                            <EditableView
+                                GetValue={returnEmptyString}
+                                SetValue={undoable(value => (value ? this.addRow(Docs.Create.TextDocument(value, { title: value, _layout_autoHeight: true })) : false), 'add text doc')}
+                                placeholder={"Type text to create note or ':' to create specific type"}
+                                contents={'+ New Node'}
+                                menuCallback={this.menuCallback}
+                                height={CollectionSchemaView._newNodeInputHeight}
+                            />
+                        </div>
+                    )}
                 </div>
                 {this.previewWidth > 0 && <div className="schema-preview-divider" style={{ width: CollectionSchemaView._previewDividerWidth }} onPointerDown={this.onDividerDown}></div>}
                 {this.previewWidth > 0 && (
-- 
cgit v1.2.3-70-g09d2

