react-native-gifted-chat
react-native-gifted-chat copied to clipboard
Unusal height in EXPO RN!!!!
Issue Description
By opening keyboard for the first time am getting the unusal height below the textinput
Steps to Reproduce / Code Snippets
<SafeAreaProvider>
<GiftedChat
messages={messages}
//@ts-ignore
onSend={(messages) => onSend(messages)}
user={{
_id: 1,
}}
bottomOffset={insets.bottom}
/>
<KeyboardAvoidingView behavior={"padding"} style={{backgroundColor: "green",}}/>
</SafeAreaProvider>
Video Link: Bug Video
- Nodejs version: [18.15.0]
- React version: [18.2]
- React Native version: [0.17.8]
- react-native-gifted-chat version: [2.40.0]
- Platform(s) (iOS, Android, or both?): [Android]
- TypeScript version: [5.0.4]
Just curious, why do you even need KeyboardAvoidingView?
I have something like
import { SafeAreaView } from 'react-native';
<SafeAreaView style={{ flex: 1 }}>
<GiftedChat />
</SafeAreaView>
and that seem to be working as expected..
Also, if you look here: https://github.com/FaridSafi/react-native-gifted-chat/blob/master/src/GiftedChat.tsx
the package does seem to do the calculations...
Also take a look at https://github.com/FaridSafi/react-native-gifted-chat/issues/2409. did you try giving bottomOffset?