Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public rowCount = this.props.hasNextPage ? this.props.list.length + 1 : this.props.list.length;
- public rowCount = this.props.hasNextPage ? this.props.list.length + 1 : this.props.list.length;
- <InfiniteLoader
- rowCount={this.rowCount}
- isRowLoaded={({ index }) => !!this.props.list[index]}
- loadMoreRows={this.props.loadMoreRows}
- minimumBatchSize={10}
- threshold={5}
- >
- {({ onRowsRendered, registerChild }) => (
- <WindowScroller>
- {({ height, isScrolling, onChildScroll, scrollTop }) => (
- <AutoSizer disableHeight>
- {({ width }) => (
- <List
- ref={list => {
- this.listRef = list;
- registerChild(list);
- }}
- onRowsRendered={onRowsRendered}
- autoHeight
- width={width}
- height={height}
- rowCount={this.props.list.length}
- rowHeight={56}
- rowRenderer={this.rowRenderer}
- overscanRowCount={0}
- isScrolling={isScrolling}
- onScroll={onChildScroll}
- scrollTop={scrollTop}
- />
- )}
- </AutoSizer>
- )}
- </WindowScroller>
- )}
- </InfiniteLoader>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement