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.

onEndReached not called if RecyclerListView is contained within a View

See original GitHub issue

Like the title says, onEndReached is never called if RecyclerListView is wrapped in a view

    const { width, height } = Dimensions.get('window');

    return (
      <View style={{width: '100%', height, flex: 1 }}>
        <RecyclerListView 
          ref={ref => this.listRef = ref}
          initialRenderIndex={currentIndex}
          layoutProvider={this._layoutProvider} 
          dataProvider={images} 
          rowRenderer={this._rowRenderer} 
          onEndReachedThreshold={0.75}
          onEndReached={this.loadNextPage}
          style={{flex:1}}
        />
        {isLoading &&
          <Bar indeterminate width={null} height={2} borderRadius={0} />
        }
      </View>
    );   

This works totally fine if I remove the View, and I have tried different style options as suggested here to no avail. Tired the latest beta version and had no improvements.

Can I get some help here please?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

8reactions
omerellacommented, Feb 19, 2020

@fariya12 @abrenoch Was facing the same issue on Android. Add ‘renderFooter’ and it will work in Android as well.

0reactions
dkat15commented, Jun 5, 2020

I am also facing this issue @naqvitalha . It is wrapped in a view with style={{ flex: 1}} image

Any solution? Also when it reached end item the screen is hanged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ListView's onEndReached not working when inside a View
I want to render a listview that updates the data when onEndReached. While the data is updated, I want to render a 'loading'...
Read more >
Known issues | FlashList
1) FlashList's rendered size is not usable warning​. FlashList uses recyclerlistview to leverage its recycling capability. · 2) onEndReached ...
Read more >
you specified `onscroll` on a <scrollview> but not ...
Follows a similar event signature and configuration as onEndReached and onEndReachedThreshold Please note that the event info contains a distanceFromStart field ...
Read more >
recyclerlistview - npm Package Health Analysis - Snyk
Snyk scans all the packages in your projects for vulnerabilities and provides ... No known security issues ... View more ways to use...
Read more >
How to Create React Native FlatList Load More On Scroll
Check out on udemy: https://bit.ly/3vbA1LX#ReactNative #FlatListLoadMore #expoThis is the video about how we can add load more funcanality ...
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