We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c235c8d commit 83d66c9Copy full SHA for 83d66c9
src/GiftedChat.tsx
@@ -401,12 +401,21 @@ class GiftedChat<TMessage extends IMessage = IMessage> extends React.Component<
401
}
402
403
componentDidUpdate(prevProps: GiftedChatProps<TMessage> = {}) {
404
- const { messages, text } = this.props
+ const { messages, text, inverted } = this.props
405
406
if (this.props !== prevProps) {
407
this.setMessages(messages || [])
408
409
410
+ if (
411
+ inverted === false &&
412
+ messages &&
413
+ prevProps.messages &&
414
+ messages.length !== prevProps.messages.length
415
+ ) {
416
+ setTimeout(() => this.scrollToBottom(false), 200)
417
+ }
418
+
419
if (text !== prevProps.text) {
420
this.setTextFromProp(text)
421
0 commit comments