From 68553bf4c1de2b640a376f0ac4755a6c5bc7dd79 Mon Sep 17 00:00:00 2001
From: Marcin Aman <marcin.aman@gmail.com>
Date: Thu, 1 Oct 2020 08:38:31 +0200
Subject: Improve styles

---
 .../main/components/navigationPaneSearch/navigationPaneSearch.tsx    | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'plugins/base/frontend/src/main/components/navigationPaneSearch/navigationPaneSearch.tsx')

diff --git a/plugins/base/frontend/src/main/components/navigationPaneSearch/navigationPaneSearch.tsx b/plugins/base/frontend/src/main/components/navigationPaneSearch/navigationPaneSearch.tsx
index 47323e73..b11b36f6 100644
--- a/plugins/base/frontend/src/main/components/navigationPaneSearch/navigationPaneSearch.tsx
+++ b/plugins/base/frontend/src/main/components/navigationPaneSearch/navigationPaneSearch.tsx
@@ -26,6 +26,10 @@ export const NavigationPaneSearch = () => {
         setFilterValue('')
     }
 
+    const shouldShowPopup = (filterState: string): boolean => {
+        return filterState.trim().length !== 0
+    }
+
     useEffect(() => {
         const pathToRoot = (window as IWindow).pathToRoot
         const url = pathToRoot.endsWith('/') ? `${pathToRoot}scripts/navigation-pane.json` : `${pathToRoot}/scripts/navigation-pane.json`
@@ -60,6 +64,7 @@ export const NavigationPaneSearch = () => {
                     popupClassName={"navigation-pane-popup"}
                     onSelect={onChangeSelected}
                     onFilter={onFilter}
+                    shouldShowPopup={shouldShowPopup}
                     renderOptimization={false}
                 />
                 <span className={"paneSearchInputClearIcon"} onClick={onClearClick}><ClearIcon /></span>
-- 
cgit 

