mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-09-22 22:28:22 +03:00
add more searchbar options
This commit is contained in:
@@ -70,17 +70,20 @@ export default function ServerManager({navigation}) {
|
||||
|
||||
return q.sorted("lastUsed");
|
||||
}, [query, searchQuery]);
|
||||
|
||||
// use effect to allow using the search bar
|
||||
|
||||
// enable searchbar
|
||||
useEffect(() => {
|
||||
navigation.setOptions({
|
||||
headerSearchBarOptions: {
|
||||
type: "text",
|
||||
value: searchQuery,
|
||||
autoCorrect: "none",
|
||||
autoCapitalize: "none",
|
||||
onChangeText: e => setSearchQuery(e.nativeEvent.text)
|
||||
},
|
||||
})
|
||||
}, [navigation, setSearchQuery]);
|
||||
|
||||
|
||||
|
||||
if (!servers.length) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user