Skip to content

InfiniteLoader when scroll reverse do not respect minimumBatchSize #217

@rodcorsi

Description

@rodcorsi

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions