React-virtualized: InfiniteLoader when scroll reverse do not respect minimumBatchSize

Created on 7 May 2016  路  3Comments  路  Source: bvaughn/react-virtualized

If you test InfiniteLoader.example.js with some changes:

change line 26

    this.state = {
      loadedRowsCount: 0,
      loadedRowsMap: {},
      loadingRowsCount: 0,
      randomScrollToIndex: 500 //change here
    }

add a console.log line 122

  _loadMoreRows ({ startIndex, stopIndex }) {
    const { loadedRowsMap, loadingRowsCount } = this.state
    const increment = stopIndex - startIndex + 1
    console.log(startIndex+" => "+stopIndex+' increment:'+increment); //add this line
    for (var i = startIndex; i <= stopIndex; i++) {

when you scroll in reverse direction you can see the increment is always 1.

how can I do InfiniteLoader respect minimumBatchSize in both directions?

bug

Most helpful comment

@rodrigocorsi2: This has been fixed in version 7.0.5. Thanks for the bug report. :)

All 3 comments

Looks like a bug.

My hands are pretty full with the version 7 update at the moment so I'm probably not going to get to this for a couple of days.

@rodrigocorsi2: This has been fixed in version 7.0.5. Thanks for the bug report. :)

Thank you @bvaughn !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hyeminHwang picture hyeminHwang  路  3Comments

mccambridge picture mccambridge  路  3Comments

johnnyji picture johnnyji  路  3Comments

clauderic picture clauderic  路  3Comments

mikedevita picture mikedevita  路  3Comments