0

I really don't understand what I'm doing wrong, going by the docs.
Explanation to the title:
When I scroll from 1 to 2 (i.e - 1 is now hidden) - everything's fine.
When I scroll from 2 to 3 (i.e - 1 and 2 are now both hidden) - The List jumps, so it doesn't begin from item 3, it begins with item 4 instead!
When I scroll all the way down, I have the remainder of all the skipped items, which means there's an empty space in which no item is present .
here's my code:


class MyList extends React.Component {
    rowRenderer = (params: any): JSX.Element => {
       const color = params.index % 2 ? 'white' : 'blue';
       return (
          <div style={{height: 50, backgroundColor: color}}>
             {this.items[params.index]}
          </div>
       );
    }

    render() {
       <div style={{height: 300}}>
           <List
               height={300}
               width={235}
               rowHeight={50}
               rowCount={this.items.length}
               rowRenderer={this.rowRenderer}
           />
       </div>
    }
}
Wassap124
  • 381
  • 4
  • 14
  • `rowCound` doesn't seem like it's a valid prop – Shawn Yap Apr 23 '19 at 14:47
  • changed **here** to `rowCount`, this is not a problem in the code (I had to copy it from one computer to another by sight, so some spell errors like this could appear) – Wassap124 Apr 24 '19 at 02:06
  • https://github.com/bvaughn/react-virtualized/issues/842, this issue ticket seems similar to your problem hope it resolves for you too. – Shawn Yap Apr 24 '19 at 15:06

0 Answers0