From 6f72743516e47a6ad077bb8e894c8005fee29fc7 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 2 Sep 2020 00:12:59 -0400
Subject: fixed search in text boxes to ignore case.  fixed creating new tabs
 when only a stack exists.  fixed SearchBox to only create one time.

---
 src/client/views/MainView.tsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'src/client/views/MainView.tsx')

diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 6db518f1e..7c7c5b72b 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -56,6 +56,7 @@ import { PreviewCursor } from './PreviewCursor';
 import { PropertiesView } from './PropertiesView';
 import { SearchBox } from './search/SearchBox';
 import { TraceMobx } from '../../fields/util';
+import { SelectionManager } from '../util/SelectionManager';
 const _global = (window /* browser */ || global /* node */) as any;
 
 @observer
@@ -519,12 +520,18 @@ export class MainView extends React.Component {
             </defs>
         </svg>;
     }
+    select = (ctrlPressed: boolean) => { SelectionManager.SelectDoc(this, ctrlPressed); };
 
     @computed get search() {
         TraceMobx();
         return <div className="mainView-searchPanel">
-            <DocumentView Document={CurrentUserUtils.MySearchPanelDoc}
+            <SearchBox Document={CurrentUserUtils.MySearchPanelDoc}
                 DataDoc={undefined}
+                fieldKey="data"
+                dropAction="move"
+                isSelected={returnTrue}
+                active={returnTrue}
+                select={this.select}
                 LibraryPath={emptyPath}
                 addDocument={undefined}
                 addDocTab={this.addDocTabFunc}
@@ -541,7 +548,6 @@ export class MainView extends React.Component {
                 PanelHeight={this.getPHeight}
                 renderDepth={0}
                 focus={emptyFunction}
-                parentActive={returnTrue}
                 whenActiveChanged={emptyFunction}
                 bringToFront={emptyFunction}
                 docFilters={returnEmptyFilter}
-- 
cgit v1.2.3-70-g09d2

