I am calculating the height of the List
component using the formula:
rowHeight * rowCount
(in fact, I still don't understand why height
is required if it can be calculated from the other two props).
But it seems that the list rendered is longer than it should be.
Below is a screenshot. You see here that below the last row there's tons of empty space.
Here's the code for the list:
let height = rowHeight * this.state.leads.length
items = (<div style={{minHeight: 100}}>
<List
ref={list => this.list=list}
height={height}
width={1600}
rowCount={this.state.leads.length}
rowHeight={rowHeight}
rowRenderer={(p) => this.rowRenderer(p, search_results)} />
</div>)