Always hide autocomplete
This commit is contained in:
@@ -580,13 +580,13 @@ export function SearchScreen(
|
|||||||
|
|
||||||
const onSubmit = React.useCallback(() => {
|
const onSubmit = React.useCallback(() => {
|
||||||
scrollToTopWeb()
|
scrollToTopWeb()
|
||||||
|
setShowAutocomplete(false)
|
||||||
updateSearchHistory(searchText)
|
updateSearchHistory(searchText)
|
||||||
|
|
||||||
if (isWeb) {
|
if (isWeb) {
|
||||||
navigation.push('Search', {q: searchText})
|
navigation.push('Search', {q: searchText})
|
||||||
} else {
|
} else {
|
||||||
textInput.current?.blur()
|
textInput.current?.blur()
|
||||||
setShowAutocomplete(false)
|
|
||||||
navigation.setParams({q: searchText})
|
navigation.setParams({q: searchText})
|
||||||
}
|
}
|
||||||
}, [navigation, searchText, updateSearchHistory])
|
}, [navigation, searchText, updateSearchHistory])
|
||||||
@@ -609,10 +609,10 @@ export function SearchScreen(
|
|||||||
)
|
)
|
||||||
|
|
||||||
const handleHistoryItemClick = (item: string) => {
|
const handleHistoryItemClick = (item: string) => {
|
||||||
|
setShowAutocomplete(false)
|
||||||
if (isWeb) {
|
if (isWeb) {
|
||||||
navigation.push('Search', {q: item})
|
navigation.push('Search', {q: item})
|
||||||
} else {
|
} else {
|
||||||
setShowAutocomplete(false)
|
|
||||||
navigation.setParams({q: item})
|
navigation.setParams({q: item})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user