From ea8fc6cbc6c3b976a0c345e834c6a91d338f97c5 Mon Sep 17 00:00:00 2001 From: Andy Rickert Date: Tue, 28 Jul 2020 18:49:56 -0400 Subject: ui --- src/client/views/search/SearchBox.tsx | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index 73932896b..05befc12f 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -199,6 +199,7 @@ export class SearchBox extends ViewBoxBaseComponent([]); console.log("CLOSE"); runInAction(() => { this.open = false }); } @@ -218,7 +219,7 @@ export class SearchBox extends ViewBoxBaseComponent { this.expandedBucket = false }); // } - if (StrCast(this.layoutDoc._searchString) !== "") { + if (StrCast(this.layoutDoc._searchString) !== "" && this.filter === false) { console.log("OPEN"); runInAction(() => { this.open = true }); } @@ -348,10 +349,6 @@ export class SearchBox extends ViewBoxBaseComponent { const layout: string = StrCast(element.props.Document.layout); - - console.log(DocListCast(element.dataDoc[Doc.LayoutFieldKey(element.dataDoc)])); - console.log(DocListCast(element.dataDoc[Doc.LayoutFieldKey(element.dataDoc)]).length); - //checks if selected view (element) is a collection. if it is, adds to list to search through if (layout.indexOf("Collection") > -1) { //makes sure collections aren't added more than once @@ -472,7 +469,6 @@ export class SearchBox extends ViewBoxBaseComponent { - this.checkIcons(); if (reset) { this.layoutDoc._searchString = ""; @@ -682,6 +678,7 @@ export class SearchBox extends ViewBoxBaseComponent) => { if (!this._resultsRef.current) return; + this.props.Document._schemaHeaders = new List([]); const scrollY = e ? e.currentTarget.scrollTop : this._resultsRef.current ? this._resultsRef.current.scrollTop : 0; const itemHght = 53; @@ -767,8 +764,6 @@ export class SearchBox extends ViewBoxBaseComponent([]); let schemaheaders: SchemaHeaderField[] = []; this.headerscale = headers.size; headers.forEach((item) => schemaheaders.push(new SchemaHeaderField(item, "#f1efeb"))) @@ -1126,20 +1121,28 @@ export class SearchBox extends ViewBoxBaseComponent
{this.filter === true ?
-- cgit v1.2.3-70-g09d2