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

Scroll move back to top on loadmore data

Open yasir-rafiq opened this issue 2 years ago • 5 comments

<InfiniteScroll height={'800px'} dataLength={this.props.items.length} next={this.fetchMoreData} hasMore={true} loader={<></>} > {this.props.items.map((item, index) => { if((_this.props.filters.favourite == 1 && item.favourite == 1) || (_this.props.filters.favourite == 0)) {

                      return <items />
                      // </Animatable.View>
                      
                    }
                  }
                )}
            </InfiniteScroll>

yasir-rafiq avatar Nov 04 '21 11:11 yasir-rafiq

@yasir-rafiq I'm having the same issue, how did you solve it?

utiq avatar Nov 09 '21 04:11 utiq

I think this has to do with the item list being passed as prop instead of an internal state. Hopefully the devs will se this.

PabloReszczynski avatar Dec 20 '21 13:12 PabloReszczynski

solved! use InfiniteScroll component as parent Div

Smitgamit avatar Jan 17 '22 05:01 Smitgamit

I am having the same issue did someone solved this issue?

Talhafayyaz11 avatar May 31 '22 09:05 Talhafayyaz11

solved! use InfiniteScroll component as parent Div

Solve because not caused re-render

shadowgroundz avatar Feb 23 '23 08:02 shadowgroundz