Don't submit search if query is empty
This commit is contained in:
parent
4effa88aec
commit
d3f525ab28
1 changed files with 2 additions and 0 deletions
|
@ -79,6 +79,8 @@ export const SearchScreen = withAuthRequired(
|
||||||
}, [setQuery, autocompleteView, store])
|
}, [setQuery, autocompleteView, store])
|
||||||
|
|
||||||
const onSubmitQuery = React.useCallback(() => {
|
const onSubmitQuery = React.useCallback(() => {
|
||||||
|
if (query.length === 0) return
|
||||||
|
|
||||||
const model = new SearchUIModel(store)
|
const model = new SearchUIModel(store)
|
||||||
model.fetch(query)
|
model.fetch(query)
|
||||||
setSearchUIModel(model)
|
setSearchUIModel(model)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue