From eca69a005536dec7fcc129bf4fe7c16acb3c9275 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 25 Aug 2020 15:05:59 -0400 Subject: added resize handle for searchbox --- src/client/views/search/SearchBox.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/client/views/search') diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index 4bffc89ea..5739c2a67 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -10,7 +10,7 @@ import { List } from '../../../fields/List'; import { createSchema, listSpec, makeInterface } from '../../../fields/Schema'; import { SchemaHeaderField } from '../../../fields/SchemaHeaderField'; import { Cast, NumCast, StrCast } from '../../../fields/Types'; -import { returnFalse, returnZero } from '../../../Utils'; +import { returnFalse, returnZero, setupMoveUpEvents, emptyFunction } from '../../../Utils'; import { Docs } from '../../documents/Documents'; import { DocumentType } from "../../documents/DocumentTypes"; import { SetupDrag } from '../../util/DragManager'; @@ -443,7 +443,7 @@ export class SearchBox extends ViewBoxBaseComponent this.props.ScreenToLocalTransform().translate(-5, -65);// listBox padding-left and pres-box-cont minHeight panelHeight = () => this.props.PanelHeight(); selectElement = (doc: Doc) => { /* this.gotoDocument(this.childDocs.indexOf(doc), NumCasst(this.layoutDoc._itemIndex)); */ }; - returnHeight = () => 31 + 31 * 6; + returnHeight = () => NumCast(this.layoutDoc._height); returnLength = () => Math.min(window.innerWidth, 51 + 205 * Cast(this.props.Document._schemaHeaders, listSpec(SchemaHeaderField), []).length); @action @@ -532,7 +532,7 @@ export class SearchBox extends ViewBoxBaseComponent r?.focus()}>
-
+
+
setupMoveUpEvents(this, e, (e: PointerEvent, down: number[], delta: number[]) => { + this.props.Document._height = NumCast(this.props.Document._height) + delta[1]; + return false; + }, returnFalse, emptyFunction)} + > + +
-- cgit v1.2.3-70-g09d2