fix: searchbox should collapse if query is not empty

This commit is contained in:
Hossein Mehrabi 2023-09-29 17:17:26 +03:30
parent d6d9cb57e4
commit 3be1bb2275
No known key found for this signature in database
GPG Key ID: 45C04964191AFAA1
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ export const SearchBox: React.FC<SearchBoxProps> = ({
const [activeInput, setActiveInput] = useState(false)
const stickyComponent = globalMode
? 'results'
: focused || !activeInput
: query.length === 0 || !activeInput
? 'root'
: 'results'