Skip to content

Autoscrolling to new message is not working when inverted is false #2612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
surajbhosale45 opened this issue Apr 3, 2025 · 1 comment
Open

Comments

@surajbhosale45
Copy link

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();
}}>


)}
user={{
_id: currentUserInfo?.id,
name: ${currentUserInfo?.firstName} ${currentUserInfo?.lastName},
}}
text={inputText}
onInputTextChanged={text => setInputText(text)}
renderBubble={renderCustomBubble}
renderInputToolbar={renderCustomInputToolbar}
placeholder={t('TYPE_MESSAGE')}
/>

@sebasbeleno
Copy link

same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants