fix: search input bug clearing query

This commit is contained in:
Hossein Mehrabi 2023-09-01 15:47:35 +03:30
parent 2b7e6db146
commit 3875465041
No known key found for this signature in database
GPG Key ID: 45C04964191AFAA1
1 changed files with 5 additions and 1 deletions

View File

@ -122,7 +122,6 @@ const SearchBox = (props: SearchBoxProps) => {
setTimeout(() => {
setPlaceholder(copyConfigs.search.searchbarPlaceholders.global())
}, 200)
setQuery('')
}
}, [focused, queryInput])
@ -181,6 +180,11 @@ const SearchBox = (props: SearchBoxProps) => {
)
}, [query, filterTags, filterContentTypes])
// useEffect(() => {
// if (focused) return
// if (query !== queryInput) setQuery(queryInput)
// }, [focused, query, queryInput])
const hydrated = useHydrated()
return (