diff --git a/src/components/search.js b/src/components/search.js
index bafcb4be81..e1ccbd993e 100644
--- a/src/components/search.js
+++ b/src/components/search.js
@@ -63,6 +63,7 @@ function Search(props) {
const [results, setResults] = useState([]);
const searchInput = useRef(null);
const {t} = useTranslation();
+ const [searchDone, setSearchDone] = useState(false);
const handleSearch = useCallback((searchInput) => {
const results = [];
@@ -122,7 +123,11 @@ function Search(props) {
() => {
if (searchValue) {
handleSearch(searchValue);
+ setTimeout(() => {
+ setSearchDone(true);
+ }, 800);
} else {
+ setSearchDone(false);
setResults([]);
}
},
@@ -225,12 +230,19 @@ function Search(props) {
onClick={() => {
setSearchValue('');
setResults([]);
+ setSearchDone(false);
}}
>