react-native-gifted-chat icon indicating copy to clipboard operation
react-native-gifted-chat copied to clipboard

Unusal height in EXPO RN!!!!

Open theprashant-one opened this issue 1 year ago • 7 comments

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]

theprashant-one avatar Jul 15 '23 15:07 theprashant-one

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...

NiharR27 avatar Jul 17 '23 10:07 NiharR27

Also take a look at https://github.com/FaridSafi/react-native-gifted-chat/issues/2409. did you try giving bottomOffset?

NiharR27 avatar Jul 17 '23 11:07 NiharR27