aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/onboarding/RegistrationWizard.tsx19
-rw-r--r--src/components/search/SearchBar.tsx1
2 files changed, 13 insertions, 7 deletions
diff --git a/src/components/onboarding/RegistrationWizard.tsx b/src/components/onboarding/RegistrationWizard.tsx
index 31c3bbdf..0094c8af 100644
--- a/src/components/onboarding/RegistrationWizard.tsx
+++ b/src/components/onboarding/RegistrationWizard.tsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, {useEffect} from 'react';
import {View, StyleSheet, ViewProps, Keyboard} from 'react-native';
import * as Animatable from 'react-native-animatable';
@@ -13,12 +13,17 @@ const RegistrationWizard = (props: RegistrationWizardProps) => {
// detects visibility of keyboard to display or hide wizard
const [keyboardVisible, setKeyboardVisible] = React.useState(false);
- Keyboard.addListener('keyboardDidShow', () => {
- setKeyboardVisible(true);
- });
- Keyboard.addListener('keyboardDidHide', () => {
- setKeyboardVisible(false);
- });
+ useEffect(() => {
+ const showKeyboard = () => setKeyboardVisible(true);
+ Keyboard.addListener('keyboardWillShow', showKeyboard);
+ return () => Keyboard.removeListener('keyboardWillShow', showKeyboard);
+ }, []);
+
+ useEffect(() => {
+ const hideKeyboard = () => setKeyboardVisible(false);
+ Keyboard.addListener('keyboardWillHide', hideKeyboard);
+ return () => Keyboard.removeListener('keyboardWillHide', hideKeyboard);
+ }, []);
return (
<View {...props}>
diff --git a/src/components/search/SearchBar.tsx b/src/components/search/SearchBar.tsx
index ce825d8a..a711f8f8 100644
--- a/src/components/search/SearchBar.tsx
+++ b/src/components/search/SearchBar.tsx
@@ -68,6 +68,7 @@ const SearchBar: React.FC<SearchBarProps> = ({
placeholderTextColor={'#fff'}
onSubmitEditing={handleSubmit}
clearButtonMode="while-editing"
+ autoCapitalize="none"
{...{value, onChangeText, onFocus, onBlur}}
/>
</Animated.View>