From 825bf223add7652860cc8cc95f48d183da2d0eb3 Mon Sep 17 00:00:00 2001
From: Andy Rickert <andrew_rickert@brown.edu>
Date: Tue, 7 Jul 2020 22:01:36 -0400
Subject: ui changes from sally and new collumns on search

---
 src/client/views/search/SearchBox.tsx | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'src/client/views/search/SearchBox.tsx')

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) {
-- 
cgit v1.2.3-70-g09d2

