aboutsummaryrefslogtreecommitdiff
path: root/src/components/search/SearchBar.tsx
diff options
context:
space:
mode:
authorLeon Jiang <35908040+leonyjiang@users.noreply.github.com>2020-08-19 11:54:00 -0700
committerGitHub <noreply@github.com>2020-08-19 14:54:00 -0400
commitabc2d25bfc06a40129b86d8387d6bec1dd197711 (patch)
tree5aae02335edd778814f0529e0d5d7adbf1d76e0f /src/components/search/SearchBar.tsx
parent7596b69482914569cbb4bb5f287bbc0a72d74133 (diff)
[TMA-25*] Search Functionality Bug Fixes (#35)
* Fix text input bugs * Disable scrolling when searching * Fix scroll function in results ScrollView * Resolve animation issues * [TMA-161] Recently Searched Users (#34) * Basic AsyncStorage code * Basic implementation complete Need to fix re-rendering bug * Removed errant comment * Fixed bug for rerendering upon addition to recents Need to fix bug for rerendering upon clearing * Fixed rerendering bug for clear * Only present recents header if users in recents * Lint cleaning * Basic AsyncStorage code * Basic implementation complete Need to fix re-rendering bug * Removed errant comment * Fixed bug for rerendering upon addition to recents Need to fix bug for rerendering upon clearing * Fixed rerendering bug for clear * Only present recents header if users in recents * Lint cleaning * Added comments for a function * Updated conditional presentation to use ternary * Created component for List Section Headers * Lint cleaning * Converted component to be for Recent Searches As opposed to just the list header * Fix text input bugs * Disable scrolling when searching * Fix scroll function in results ScrollView * Resolve animation issues Co-authored-by: Justin Shillingford <jgs272@cornell.edu>
Diffstat (limited to 'src/components/search/SearchBar.tsx')
-rw-r--r--src/components/search/SearchBar.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/search/SearchBar.tsx b/src/components/search/SearchBar.tsx
index 8bb93d54..ce825d8a 100644
--- a/src/components/search/SearchBar.tsx
+++ b/src/components/search/SearchBar.tsx
@@ -17,6 +17,10 @@ import Animated, {
import {SCREEN_HEIGHT} from '../../utils';
import Icon from 'react-native-vector-icons/Feather';
+const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);
+
+const AnimatedIcon = Animated.createAnimatedComponent(Icon);
+
interface SearchBarProps extends TextInputProps {
onCancel: () => void;
top: Animated.Value<number>;
@@ -48,8 +52,6 @@ const SearchBar: React.FC<SearchBarProps> = ({
e.preventDefault();
Keyboard.dismiss();
};
- const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);
- const AnimatedIcon = Animated.createAnimatedComponent(Icon);
return (
<View style={[styles.container, style]}>
@@ -100,6 +102,7 @@ const styles = StyleSheet.create({
input: {
flex: 1,
fontSize: 16,
+ color: '#fff',
},
cancelButton: {
position: 'absolute',