[iOS] If you scroll fast to the top onLoadEarlier is not invoked
See original GitHub issueIssue Description
If you scroll to the top slowly all works good but if you scroll very fast then onLoadEarlier is not invoked
Steps to Reproduce / Code Snippets
<GiftedChat messages={mapMessages(messages)} loadEarlier onLoadEarlier={loadMoreMessages} renderLoadEarlier={() => { return isLoadingEarlier ? ( <View style={{ marginBottom: 20, marginTop: 10 }}> <ActivityIndicator /> </View> ) : null; }} infiniteScroll
Expected Results
onLoadEarlier should be invoked
Additional Information
- Nodejs version: v14.15.4
- React version: 16.13.1
- React Native version: 0.63.3
- react-native-gifted-chat version: 0.16.3
- Platform(s) (iOS, Android, or both?): iOS 14.4.2
- TypeScript version: no typescript
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
UITextView.scrollRangeToVisible() … | Apple Developer Forums
I 'm looking for a workaround to do the simplest thing in the world: scroll the damn textView to the bottom. iOS.
Read more >@cookiespam/react-native-gifted-chat - npm
infiniteScroll (Bool) - infinite scroll up when reach the top of messages container, automatically call onLoadEarlier function if exist (not yet ...
Read more >UITextView is not scrolled to top when loaded - Stack Overflow
I can still scroll it with my finger once its loaded. EDIT I found that removing the auto layout constraints and then fixing...
Read more >github.com-FaridSafi-react-native-gifted-chat_-_2021-10 ...
infiniteScroll (Bool) - infinite scroll up when reach the top of messages container, automatically call onLoadEarlier function if exist (not yet ...
Read more >Quickly scroll to the top or bottom of the page - iPhone Hacks
Being able to quickly scroll to the top of the apps by tapping on the status bar is nice, but what if you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes I used listViewProps
` <GiftedChat messages={this.state.messages} listViewProps={{ scrollEventThrottle: 400, onScroll: ({ nativeEvent }) => { if (this.isCloseToTop(nativeEvent)) { this.setState({refreshing: true}); this.loadMoreChat(); } } }} onSend={messages => this.onSend(messages)} user={{ _id: 2, }} />
isCloseToTop({ layoutMeasurement, contentOffset, contentSize }) { const paddingToTop = 80; return contentSize.height - layoutMeasurement.height - paddingToTop <= contentOffset.y; } `
Sorry, but this issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. BTW Thank you for your contributions 😀 !!!