X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/25216cc7acedc987c26a159f0b640210c0ef101e..2157030354bef3870b2703804ec18aab48cce27d:/src/views-components/search-bar/search-bar-view.tsx

diff --git a/src/views-components/search-bar/search-bar-view.tsx b/src/views-components/search-bar/search-bar-view.tsx
index 61efbcfe..28408347 100644
--- a/src/views-components/search-bar/search-bar-view.tsx
+++ b/src/views-components/search-bar/search-bar-view.tsx
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { compose } from 'redux';
 import {
     IconButton,
@@ -128,10 +128,10 @@ const handleKeyDown = (e: React.KeyboardEvent, props: SearchBarViewProps) => {
 const handleInputClick = (e: React.MouseEvent, props: SearchBarViewProps) => {
     if (props.searchValue) {
         props.onSetView(SearchView.AUTOCOMPLETE);
-        props.openSearchView();
     } else {
-        props.closeView();
+        props.onSetView(SearchView.BASIC);
     }
+    props.openSearchView();
 };
 
 const handleDropdownClick = (e: React.MouseEvent, props: SearchBarViewProps) => {
