Not sure if this is a bug or just something I wouldn't expect.
I use Grid's prop columnWidth like so:
getColumnWidth = (e:{index:number})=>{
if (this.props.something==true && e.index==0){
return 20;
}else{
return 100;
}
};
<Grid
cellRenderer={this.cellRenderer(this.props.something)}
columnCount={this.getColumnsLength()}
columnWidth={this.getColumnWidth}
height={300}
rowCount={this.props.value.length}
rowHeight={70}
width={800}
/>
when changing this.props.something to true dynamically (after it has already renderer with
getColumnWidth actually runs like it should, however, further cellRenderer calls are still called with the incorrect style.
new rows added later are styled correctly. After scrolling everything re-renders and its ok.
Anyone familiar with this issue?
Sounds like you're not calling recomputeGridSize between renders. You'll need to call this method if previous sizes are no longer valid.
Thanks! didn't see that one.
Most helpful comment
Sounds like you're not calling
recomputeGridSizebetween renders. You'll need to call this method if previous sizes are no longer valid.