Right now when a user enters gifted chat screen, the chat will be at the end of all chat history, aka at the bottom of the scrollView. Is there a way to let the chat starts at the top of all the chat histories? Or scroll to top when the component is initialized?
Thanks in advance!
const styles = StyleSheet.create({
container: {
flex: 1,
+ flexDirection: 'row',
+ alignItems: 'flex-start'
}
If there is a better way, you can communicate
it is better than another way of ' contentContainerStyle: {'flexGrow': 1, 'justifyContent': 'flex-end'} '
@xcarpentier could you not add these style changes as part of the inverted prop fix?
The suggestion made by @lfh22 seems to fix the various open 'start at top' bugs / issues currently open, such as mine: https://github.com/FaridSafi/react-native-gifted-chat/issues/666
Adding this fix would presumably close a bunch of those.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
find MessageContainer.js (node_modules/react-native-gifted-chat/src/MessageContainer.js),add flexDirection: 'row',alignItems: 'flex-start'
const styles = StyleSheet.create({
container: {
flex: 1,
+ flexDirection: 'row',
+ alignItems: 'flex-start'
}
If there is a better way, you can communicate