aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/frontend/src/main/components/navigationPaneSearch
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2020-10-01 08:38:31 +0200
committerKamil Doległo <9080183+kamildoleglo@users.noreply.github.com>2020-10-08 16:35:33 +0200
commit68553bf4c1de2b640a376f0ac4755a6c5bc7dd79 (patch)
tree034b33e61920f1fa21a1ba44f28ce1d529a79b17 /plugins/base/frontend/src/main/components/navigationPaneSearch
parentfd88f63f7f2874df7a4a58a5c7126d8a5a15225b (diff)
downloaddokka-68553bf4c1de2b640a376f0ac4755a6c5bc7dd79.tar.gz
dokka-68553bf4c1de2b640a376f0ac4755a6c5bc7dd79.tar.bz2
dokka-68553bf4c1de2b640a376f0ac4755a6c5bc7dd79.zip
Improve styles
Diffstat (limited to 'plugins/base/frontend/src/main/components/navigationPaneSearch')
-rw-r--r--plugins/base/frontend/src/main/components/navigationPaneSearch/navigationPaneSearch.tsx5
1 files changed, 5 insertions, 0 deletions
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>