SHARE
TWEET

Untitled

a guest Jun 20th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public rowCount = this.props.hasNextPage ? this.props.list.length + 1 : this.props.list.length;
  2.      
  3. public rowCount = this.props.hasNextPage ? this.props.list.length + 1 : this.props.list.length;
  4.  
  5. <InfiniteLoader
  6.         rowCount={this.rowCount}
  7.         isRowLoaded={({ index }) => !!this.props.list[index]}
  8.         loadMoreRows={this.props.loadMoreRows}
  9.         minimumBatchSize={10}
  10.         threshold={5}
  11.       >
  12.         {({ onRowsRendered, registerChild }) => (
  13.           <WindowScroller>
  14.             {({ height, isScrolling, onChildScroll, scrollTop }) => (
  15.               <AutoSizer disableHeight>
  16.                 {({ width }) => (
  17.                   <List
  18.                     ref={list => {
  19.                       this.listRef = list;
  20.                       registerChild(list);
  21.                     }}
  22.                     onRowsRendered={onRowsRendered}
  23.                     autoHeight
  24.                     width={width}
  25.                     height={height}
  26.                     rowCount={this.props.list.length}
  27.                     rowHeight={56}
  28.                     rowRenderer={this.rowRenderer}
  29.                     overscanRowCount={0}
  30.                     isScrolling={isScrolling}
  31.                     onScroll={onChildScroll}
  32.                     scrollTop={scrollTop}
  33.                   />
  34.                 )}
  35.               </AutoSizer>
  36.             )}
  37.           </WindowScroller>
  38.         )}
  39.       </InfiniteLoader>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top