ankeetmaini / react-infinite-scroll-component

An awesome Infinite Scroll component in react.
https://react-infinite-scroll-component.netlify.com/
MIT License
2.85k stars 322 forks source link

loader still shows if empty array returned from api #324

Open jees47 opened 2 years ago

jees47 commented 2 years ago

the loader still showing eventhough the api returns empty array. is there any props to show "No Items Found" message when api returns empty array?

subu873 commented 2 years ago

Please watch this video for this library https://youtu.be/c0nKjMnDfG4

Matthias-Claes commented 2 years ago

Please watch this video for this library https://youtu.be/c0nKjMnDfG4

Is there an English video?

Kuro-P commented 2 years ago

Reference to the video,you can set an expression to hasMore,and all you need just to init totalCount

const totalCount = 1

And then:

image

Besides, after data updated, remember to update the value of totalCount.