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

Autoscrolling to new message is not working when inverted is false

Open surajbhosale45 opened this issue 1 year ago • 4 comments

When we send/receive any new message its not scrolling to latest message, rather its scrolling to top instead of scrolling to bottom as i given inverted={false}, also when i open chat history it should scroll to bottom.

What changes i need to made in my code?

My code: <KeyboardAvoidingView style={{flex: 1}} behavior={Platform.OS === 'ios' ? 'padding' : 'height'} keyboardVerticalOffset={isKeyboardVisible ? 170 : 0}> <GiftedChat messagesContainerStyle={{ backgroundColor: COLORS.GRAY98, ...messagesContainerStyle, }} isKeyboardInternallyHandled={false} keyboardShouldPersistTaps="never" messages={messages} inverted={false} infiniteScroll isLoadingEarlier renderAvatarOnTop renderSend={() => ( <TouchableOpacity onPress={() => { onSend(); }}> <Send2 /> </TouchableOpacity> )} user={{ _id: currentUserInfo?.id, name: ${currentUserInfo?.firstName} ${currentUserInfo?.lastName}, }} text={inputText} onInputTextChanged={text => setInputText(text)} renderBubble={renderCustomBubble} renderInputToolbar={renderCustomInputToolbar} placeholder={t('TYPE_MESSAGE')} /> </KeyboardAvoidingView>

surajbhosale45 avatar Apr 03 '25 07:04 surajbhosale45

same issue here

sebasbeleno avatar Apr 10 '25 20:04 sebasbeleno

same

GaeCuure avatar Jun 18 '25 11:06 GaeCuure

same

liuliu66666 avatar Aug 05 '25 11:08 liuliu66666

same issue

xinkuiwu avatar Oct 27 '25 03:10 xinkuiwu