aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndy Rickert <andrew_rickert@brown.edu>2020-07-07 22:01:36 -0400
committerAndy Rickert <andrew_rickert@brown.edu>2020-07-07 22:01:36 -0400
commit825bf223add7652860cc8cc95f48d183da2d0eb3 (patch)
tree024295ef4d416f6cc2db63e591a83960eec92dc8 /src
parent89f1b8b80fb84429b130329c3d94f791a7d0b3db (diff)
ui changes from sally and new collumns on search
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionSchemaView.scss3
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx1
-rw-r--r--src/client/views/collections/SchemaTable.tsx8
-rw-r--r--src/client/views/search/SearchBox.tsx11
4 files changed, 17 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss
index f844cf8bf..83fe54c82 100644
--- a/src/client/views/collections/CollectionSchemaView.scss
+++ b/src/client/views/collections/CollectionSchemaView.scss
@@ -25,7 +25,7 @@
.collectionSchemaView-tableContainer {
width: 100%;
height: 100%;
- overflow: scroll;
+ overflow: auto;
}
.collectionSchemaView-dividerDragger {
@@ -522,7 +522,6 @@ button.add-column {
.collectionSchemaView-table {
width: 100%;
height: 100%;
- overflow: visible;
}
.reactTable-sub {
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index fde3993f9..50eea5059 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -628,7 +628,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
{({ measureRef }) => <div ref={measureRef}> {menuContent} </div>}
</Measure>
</div>;
-
return <div className="collectionSchemaView-container"
style={{
pointerEvents: !this.props.active() && !SnappingManager.GetIsDragging() ? "none" : undefined,
diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx
index 878cc6f6d..e9f7e3c68 100644
--- a/src/client/views/collections/SchemaTable.tsx
+++ b/src/client/views/collections/SchemaTable.tsx
@@ -451,9 +451,10 @@ export class SchemaTable extends React.Component<SchemaTableProps> {
//@ts-ignore
expandedRowsList.forEach(row => expanded[row] = true);
const rerender = [...this.textWrappedRows]; // TODO: get component to rerender on text wrap change without needign to console.log :((((
-
+ let overflow = "auto";
+ StrCast(this.props.Document.type) === "search" ? overflow = "overlay" : "auto";
return <ReactTable
- style={{ position: "relative" }}
+ style={{ position: "relative", overflow: overflow }}
data={children}
page={0}
pageSize={children.length}
@@ -576,7 +577,8 @@ export class SchemaTable extends React.Component<SchemaTableProps> {
return <div className="collectionSchemaView-table" onPointerDown={this.props.onPointerDown} onWheel={e => this.props.active(true) && e.stopPropagation()}
onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} >
{this.reactTable}
- <div className="collectionSchemaView-addRow" onClick={() => this.createRow()}>+ new</div>
+ {StrCast(this.props.Document.type) !== "search" ? <div className="collectionSchemaView-addRow" onClick={() => this.createRow()}>+ new</div>
+ : undefined}
{!this._showDoc ? (null) :
<div className="collectionSchemaView-documentPreview" //onClick={() => { this.onOpenClick(); }}
style={{
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index d51d1bf0c..04a233809 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -38,6 +38,7 @@ import { makeInterface, createSchema } from '../../../fields/Schema';
import { listSpec } from '../../../fields/Schema';
import * as _ from "lodash";
import { checkIfStateModificationsAreAllowed } from 'mobx/lib/internal';
+import { SchemaHeaderField } from '../../../fields/SchemaHeaderField';
library.add(faTimes);
@@ -635,6 +636,16 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
result[0]._height = 46;
result[0].lines = lines;
result[0].highlighting = highlights.join(", ");
+ let headers: string[];
+ //Cast(this.props.Document._schemaHeaders, listSpec(SchemaHeaderField), []).forEach((item) => headers.push(item.heading));
+ //this.props.Document._schemaHeaders = new List<SchemaHeaderField>([]);
+ let schemaheaders: SchemaHeaderField[] = [];
+ //highlights.forEach((item) => headers.includes(item) ? undefined : schemaheaders.push(new SchemaHeaderField(`New field ${index ? "(" + index + ")" : ""}`, "#f1efeb")))
+ highlights.forEach((item) => schemaheaders.push(new SchemaHeaderField(item, "#f1efeb")))
+
+ this.props.Document._schemaHeaders = new List<SchemaHeaderField>(schemaheaders);
+
+
this._visibleDocuments[i] = result[0];
this._isSearch[i] = "search";
if (this._numTotalResults > 3 && this.expandedBucket === false) {