question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inverted = false causes message list to scroll-to-top on send

See original GitHub issue

Issue Description

Message list scrolls-to-top when submitting a new message when inverted={false}

Steps to Reproduce / Code Snippets

Set inverted={false}

Expected Results

The README says…

inverted (Bool) - Reverses display order of messages; default is true

… the message order is reversed as expected however it also causes the message list to scroll-to-top when a new message is entered which seems like the wrong behavior

Additional Information

  • Nodejs version: 8.10.0
  • React version: 16.3.0-alpha.1
  • React Native version: 0.54.4
  • react-native-gifted-chat version: 0.4.3
  • Platform(s) (iOS, Android, or both?): iOS

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:13
  • Comments:7

github_iconTop GitHub Comments

3reactions
willdadycommented, Jan 23, 2019

Workaround I’ve used is to not set inverted and to reverse the order of the messages array before passing it to the messages prop.

1reaction
songxiaoliangcommented, Apr 13, 2019

Same issue here! Anyone found a solution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native flatlist initial scroll to bottom
If you want to display the message inverted, set "inverted" to true in the flat list.
Read more >
ScrollView
Component that wraps platform ScrollView while providing integration with touch locking "responder" system.
Read more >
Bi-directional infinite scroll in Vue JS | by Sainath S.R
Implement infinite scrolling in Vue with intersection observer . Lazy load items on scrolldown OR scrollup.
Read more >
VMware SD-WAN 4.3.0 Release Notes
If the control message has an invalid action, it can cause the Gateway to restart when trying to route the data packets of...
Read more >
Smooth Scrolling
preventDefault(); $('html, body').animate({ scrollTop: target.offset().
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found