dcurletti/redux-infinite-scroll

[bug] | Get all datas when I set div hidden

Closed this issue · 1 comments

I have an scroll in the div with click event

        <div className={ classNames('favorite-list', { hidden: this.state.hidden }) }
        onClick={ () => { this.scrollClick(); } } >
          <InfiniteScroll
            loadingMore={ loadingMore }
            elementIsScrollable={ false }
            threshold={ 50 }
            items={ this.renderItem() }
            loadMore={ this.loadMore }
            hasMore={ hasMore }
            loader={ <LoadMoreTips isHidden={ !favorites.items.length } /> }
          />
        </div>

I have a state and click event

  scrollClick = () => {
    this.setState({
      hidden: !this.state.hidden
    }) 
  }

It will load all datas in InfiniteScroll div.

You will need to explain a little further in order for me to help you.

Are you saying if you start your component as "hidden", either via a display: none or some other CSS method, you would expect no loadMore calls to be made?