bvaughn/react-window

Should `isItemLoaded` return `true` for in-progress items?

WofWca opened this issue · 0 comments

i.e. for items that are currently being loaded (while the loadMoreItems promise is pending).

The docs seem to be written in a way that suggests that no,
https://github.com/bvaughn/react-window-infinite-loader/blob/56720a7b813924a4c3dd10583d26744c96901c30/README.md?plain=1#L81-L98

but the code doesn't seem to remember whether it has started to load particular items
https://github.com/bvaughn/react-window-infinite-loader/blob/56720a7b813924a4c3dd10583d26744c96901c30/src/InfiniteLoader.js#L107-L178

I did some testing, and for me it didn't look like items were loaded twice, though perhaps it's just because the promise resolves too fast for me. But for slower promises, we might request items twice I suppose, which is a little inefficient?

Related: #630