diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-19 13:07:20 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-08-19 13:07:20 -0400 |
| commit | bc7de4993eef673c6ab637343e85ec325c65e3f9 (patch) | |
| tree | e9f7e777e9be65302fc8eab49f330b3aa9dda0eb /src/client/views/collections/SchemaTable.tsx | |
| parent | ddbc5966801750fbf580d8f419263cc901dcc6f4 (diff) | |
| parent | 4058014af1a0fac01ca77b667f012696af6b5f18 (diff) | |
Merge branch 'master' into menu_restructure
Diffstat (limited to 'src/client/views/collections/SchemaTable.tsx')
| -rw-r--r-- | src/client/views/collections/SchemaTable.tsx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx index 904eaf99f..489c5e540 100644 --- a/src/client/views/collections/SchemaTable.tsx +++ b/src/client/views/collections/SchemaTable.tsx @@ -161,24 +161,24 @@ export class SchemaTable extends React.Component<SchemaTableProps> { const focusedCol = this._focusedCell.col; const isEditable = !this.props.headerIsEditing; - if (this.childDocs.reduce((found, doc) => found || doc.type === DocumentType.COL, false)) { - columns.push( - { - expander: true, - Header: "", - width: 30, - Expander: (rowInfo) => { - if (rowInfo.original.type === "collection") { - return rowInfo.isExpanded ? - <div className="collectionSchemaView-expander" onClick={() => this.onCloseCollection(rowInfo.original)}><FontAwesomeIcon icon={"caret-down"} size="sm" /></div> : - <div className="collectionSchemaView-expander" onClick={() => this.onExpandCollection(rowInfo.original)}><FontAwesomeIcon icon={"caret-right"} size="sm" /></div>; - } else { - return null; - } + //if (this.childDocs.reduce((found, doc) => found || doc.type === DocumentType.COL, false)) { + columns.push( + { + expander: true, + Header: "", + width: 60, + Expander: (rowInfo) => { + if (rowInfo.original.type === "collection") { + return rowInfo.isExpanded ? + <div className="collectionSchemaView-expander" onClick={() => this.onCloseCollection(rowInfo.original)}><FontAwesomeIcon icon={"caret-down"} size="lg" /></div> : + <div className="collectionSchemaView-expander" onClick={() => this.onExpandCollection(rowInfo.original)}><FontAwesomeIcon icon={"caret-right"} size="lg" /></div>; + } else { + return null; } } - ); - } + } + ); + // } this.props.active; const cols = this.props.columns.map(col => { @@ -603,7 +603,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} - {StrCast(this.props.Document.type) !== "search" ? <div className="collectionSchemaView-addRow" onClick={() => this.createRow()}>+ new</div> + {StrCast(this.props.Document._chromeStatus) !== "disabled" ? <div className="collectionSchemaView-addRow" onClick={() => this.createRow()}>+ new</div> : undefined} {!this._showDoc ? (null) : <div className="collectionSchemaView-documentPreview" //onClick={() => { this.onOpenClick(); }} |
