Open bronzegod3 opened 1 year ago
Getting a 0 showing up on screen when no data is present
Code:
<InfiniteScroll dataLength={0} next={this.fetchMoreData} hasMore={0} loader={<h4>Loading...</h4>} endMessage={ <p style={{ textAlign: "center" }}> <b>Yay! You have seen it all</b> </p> } > </InfiniteScroll>
results in html :
<infiinite-scroller... > "0" <p style={{ textAlign: "center" }}> <b>Yay! You have seen it all</b> </p> </infinite-scroller>
This is most likely happening because you're sending a number instead of a boolean. Have you tried changing it to hasMore=Boolean(0) or hasMore={false}?
hasMore=Boolean(0)
hasMore={false}
Getting a 0 showing up on screen when no data is present
Code:
results in html :