Don't submit search if query is empty

zio/stable
William Gibson 2023-08-22 04:27:46 -04:00
parent 4effa88aec
commit d3f525ab28
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,8 @@ export const SearchScreen = withAuthRequired(
}, [setQuery, autocompleteView, store])
const onSubmitQuery = React.useCallback(() => {
if (query.length === 0) return
const model = new SearchUIModel(store)
model.fetch(query)
setSearchUIModel(model)