react-infinite-scroll-component icon indicating copy to clipboard operation
react-infinite-scroll-component copied to clipboard

Pull to Refresh is disabled when hasMore is flipped to false

Open DemonicEgg opened this issue 4 years ago • 3 comments

<InfiniteScroll
          dataLength={posts.length}
          next={() => { this._getPosts(false);}}
          hasMore={this.state.hasMore}
          scrollableTarget={scrollTarget}
          pullDownToRefresh={isMobile}
          refreshFunction={() => this._refreshPosts()}
          pullDownToRefreshContent={
              <PtrArrow className="ptr-arrow"/>
          }
          releaseToRefreshContent={
              <PtrArrow className="ptr-arrow ptr-animation"/>
          }
          loader={<Loader />}
      >
          {
              posts.map(this._renderRow)
          }
      </InfiniteScroll>

When this.state.hasMore has changes from true to false after reaching the bottom of the page, pull to refresh seems to get disabled

DemonicEgg avatar Dec 16 '20 18:12 DemonicEgg

I also encountered such a problem. Have you solved it

If 'inverse' is set to true, then 'endmessage' and 'loader' will not be displayed

A-ANing avatar Jan 25 '21 08:01 A-ANing

I tried to change "inverse" to "true" with "setState" when "hasMore" is "false", but it failed, and "inverse" also lost its effect

Who can solve this problem?

Why can't refresh when hasmore is false

A-ANing avatar Jan 27 '21 08:01 A-ANing

I encountered the same problem too. Why can't refresh when hasmore is false.

carlSunLiang avatar Oct 29 '21 02:10 carlSunLiang