From c179f04f13dfcde88e22097680d951c449ffcb38 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 9 Jul 2021 17:43:43 -0700 Subject: Add tap to view to dismiss keyboard, Add flatlist param --- src/components/moments/MomentPost.tsx | 2 ++ src/screens/profile/IndividualMoment.tsx | 1 + 2 files changed, 3 insertions(+) (limited to 'src') diff --git a/src/components/moments/MomentPost.tsx b/src/components/moments/MomentPost.tsx index 319542f9..07295369 100644 --- a/src/components/moments/MomentPost.tsx +++ b/src/components/moments/MomentPost.tsx @@ -2,6 +2,7 @@ import {useNavigation} from '@react-navigation/native'; import React, {useContext, useEffect, useMemo, useRef, useState} from 'react'; import { Image, + Keyboard, KeyboardAvoidingView, Platform, StatusBar, @@ -252,6 +253,7 @@ const MomentPost: React.FC = ({ onPress={() => { setVisible(!visible); setFadeValue(new Animated.Value(0)); + Keyboard.dismiss(); }}> diff --git a/src/screens/profile/IndividualMoment.tsx b/src/screens/profile/IndividualMoment.tsx index c65d41e7..1b0c7c2b 100644 --- a/src/screens/profile/IndividualMoment.tsx +++ b/src/screens/profile/IndividualMoment.tsx @@ -92,6 +92,7 @@ const IndividualMoment: React.FC = ({route}) => { screenType={screenType} /> )} + keyboardShouldPersistTaps={'handled'} scrollEnabled={!keyboardVisible} keyExtractor={(item, _) => item.moment_id} showsVerticalScrollIndicator={false} -- cgit v1.2.3-70-g09d2