aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-04 15:06:30 -0400
committerbobzel <zzzman@gmail.com>2020-08-04 15:06:30 -0400
commit43f0db3b59366c65a4051db6b0f8b67b13f98a67 (patch)
treefe7cd694a0826c85232912a1af99df76a153c29b /src
parent676bccaba5055e694fcea20e02727e3f5f321131 (diff)
got rid of special-case code for _searchDOc in stackingview.
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionStackingView.tsx3
-rw-r--r--src/client/views/search/SearchBox.tsx1
2 files changed, 1 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx
index a8e3b2ebb..559365361 100644
--- a/src/client/views/collections/CollectionStackingView.tsx
+++ b/src/client/views/collections/CollectionStackingView.tsx
@@ -50,7 +50,6 @@ export class CollectionStackingView extends CollectionSubView(StackingDocument)
@computed get yMargin() { return Math.max(this.layoutDoc._showTitle && !this.layoutDoc._showTitleHover ? 30 : 0, NumCast(this.layoutDoc._yMargin, 0)); } // 2 * this.gridGap)); }
@computed get gridGap() { return NumCast(this.layoutDoc._gridGap, 10); }
@computed get isStackingView() { return BoolCast(this.layoutDoc._columnsStack, true); }
- @computed get searchDoc() { return BoolCast(this.props.Document._searchDoc, false); }
@computed get numGroupColumns() { return this.isStackingView ? Math.max(1, this.Sections.size + (this.showAddAGroup ? 1 : 0)) : 1; }
@computed get showAddAGroup() { return (this.pivotField && (this.layoutDoc._chromeStatus !== 'view-mode' && this.layoutDoc._chromeStatus !== 'disabled')); }
@computed get columnWidth() {
@@ -78,7 +77,7 @@ export class CollectionStackingView extends CollectionSubView(StackingDocument)
this._docXfs.push({ dxf, width, height });
const rowSpan = Math.ceil((height() + this.gridGap) / this.gridGap);
- const style = this.isStackingView ? { width: width(), marginTop: i || this.searchDoc ? this.gridGap : 0, marginBottom: this.searchDoc ? 10 : 0, height: height() } : { gridRowEnd: `span ${rowSpan}` };
+ const style = this.isStackingView ? { width: width(), marginTop: i ? this.gridGap : 0, height: height() } : { gridRowEnd: `span ${rowSpan}` };
return <div className={`collectionStackingView-${this.isStackingView ? "columnDoc" : "masonryDoc"}`} key={d[Id]} ref={dref} style={style} >
{this.getDisplayDoc(d, (!d.isTemplateDoc && !d.isTemplateForField && !d.PARAMS) ? undefined : this.props.DataDoc, dxf, width)}
</div>;
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index 4f9d75705..696da0c9a 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -1010,7 +1010,6 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
//Make id layour document
render() {
this.props.Document._chromeStatus === "disabled";
- this.props.Document._searchDoc = true;
let cols = Cast(this.props.Document._schemaHeaders, listSpec(SchemaHeaderField), []).length;
let length = 0;
cols > 5 ? length = 1076 : length = cols * 205 + 51;