Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infinite scroll list data merge on loadMoreRows #187

Closed
Raffiki opened this issue Apr 13, 2016 · 2 comments
Closed

infinite scroll list data merge on loadMoreRows #187

Raffiki opened this issue Apr 13, 2016 · 2 comments
Labels

Comments

@Raffiki
Copy link

Raffiki commented Apr 13, 2016

Would love to do this on Gitter, but that room seems unavailable.

So I have this this stupid question, wrapped in companion code on Plunkr: if loadMoreRows returns a Promise with the next batch of data, are we supposed to merge this batch onto the previous one? I guess this beats the purpose of the VirtualScroll but still.

I'm asking because the InfinitLoader only displays the current data batch. On first render range [0, 22] was fetched and rendered:

2016-04-13-154349_304x226_scrot

After scrolling loadMoreRows was called for the next index, with result:

2016-04-13-154401_298x240_scrot

Maybe related: the actioncreator return by loadMoreRows is a Promise, however this codeblock is never entered:

if (isRangeVisible({
lastRenderedStartIndex: _this2._lastRenderedStartIndex,
lastRenderedStopIndex: _this2._lastRenderedStopIndex,
startIndex: unloadedRange.startIndex,
stopIndex: unloadedRange.stopIndex
})) {
if (_this2._registeredChild) {
_this2._registeredChild.forceUpdate();
}

@bvaughn
Copy link
Owner

bvaughn commented Apr 13, 2016

You can always directly message me on Gitter. Others do.

My guess is you forgot to load/include the react-virtualized stylesheets (similar to #157). Docs mention this here though it's easy to overlook or forget about. I've done it myself before.

@bvaughn
Copy link
Owner

bvaughn commented Apr 13, 2016

Closing this because I'm fairly confident my answer will help you out. Feel free to ask a follow-up question here (or on Gitter) if not. :)

@bvaughn bvaughn closed this as completed Apr 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants