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

loader still shows if empty array returned from api

Open jees47 opened this issue 3 years ago • 3 comments

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?

jees47 avatar Feb 14 '22 05:02 jees47

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

subu873 avatar May 30 '22 11:05 subu873

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

Is there an English video?

Matthias-Claes avatar Jun 08 '22 08:06 Matthias-Claes

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.

Kuro-P avatar Jun 22 '22 18:06 Kuro-P