aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaView.tsx
diff options
context:
space:
mode:
authorSam Wilkins <abdullah_ahmed@brown.edu>2019-07-19 13:49:37 -0400
committerSam Wilkins <abdullah_ahmed@brown.edu>2019-07-19 13:49:37 -0400
commit17f53f604e0087615c2baff6cffa344771301b5e (patch)
tree2b47365c08734f4aa93c635fffe26fa9dca43183 /src/client/views/collections/CollectionSchemaView.tsx
parentae51e87874a714fdb46d4093fee513787b413ed8 (diff)
fixed nto being able to edit when column menu flyout is closed bug
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index 10b1e895d..ffc9d7d09 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -480,10 +480,20 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
this.previewScript = script;
}
+ @computed
+ get schemaToolbar() {
+ return (
+ <div className="collectionSchemaView-toolbar">
+ <div id="preview-schema-checkbox-div"><input type="checkbox" key={"Show Preview"} checked={this.previewWidth() !== 0} onChange={this.toggleExpander} />Show Preview</div>
+ </div>
+ );
+ }
+
render() {
return (
<div className="collectionSchemaView-container" onPointerDown={this.onPointerDown} onWheel={this.onWheel}
onDrop={(e: React.DragEvent) => this.onDrop(e, {})} onContextMenu={this.onContextMenu} ref={this.createTarget}>
+ {this.schemaToolbar}
{this.reactTable}
{this.dividerDragger}
{!this.previewWidth() ? (null) : this.previewPanel}
@@ -492,6 +502,8 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
);
}
}
+
+
interface CollectionSchemaPreviewProps {
Document?: Doc;
DataDocument?: Doc;
@@ -569,10 +581,6 @@ export class CollectionSchemaPreview extends React.Component<CollectionSchemaPre
render() {
-
- // <div id="preview-schema-checkbox-div"><input type="checkbox" key={"Show Preview"} checked={this.previewWidth() !== 0} onChange={this.toggleExpander} /> Show Preview </div>
-
-
let input = this.props.previewScript === undefined ? (null) :
<div ref={this.createTarget}><input className="collectionSchemaView-input" value={this.props.previewScript} onChange={this.onPreviewScriptChange}
style={{ left: `calc(50% - ${Math.min(75, (this.props.Document ? this.PanelWidth() / 2 : 75))}px)` }} /></div>;