diff --git a/themes/NEXT/components/SearchInput.js b/themes/NEXT/components/SearchInput.js index 25dc8ccb..73aa521b 100644 --- a/themes/NEXT/components/SearchInput.js +++ b/themes/NEXT/components/SearchInput.js @@ -4,7 +4,7 @@ import { useImperativeHandle, useRef, useState } from 'react' const SearchInput = ({ currentTag, currentSearch, cRef }) => { const { locale } = useGlobal() - const [searchKey, setSearchKey] = useState(currentSearch || '') + // const [searchKey, setSearchKey] = useState(currentSearch || '') const [onLoading, setLoadingState] = useState(false) const router = useRouter() const searchInputRef = useRef() @@ -36,11 +36,10 @@ const SearchInput = ({ currentTag, currentSearch, cRef }) => { } const cleanSearch = () => { searchInputRef.current.value = '' - setSearchKey('') } const updateSearchKey = (val) => { - setSearchKey(val) + searchInputRef.current.value = val } return