Despite AutoSizer's width providing the correct value, I am consistently encountering a height of 0 for Autosizer. This is causing the VirtualScroll component to not display properly. However, when using the disableHeight prop and setting a fixed height value (e.g. 200px) for VirtualScroll, the rows display as expected. Any insights into what could be causing this issue?
In my case, the Autosizer is intended to be used within a Material-ui Dialog component. I have also attempted rendering the autosizer in a div separately, but the same problem persists.
render() {
return (
<Dialog
modal={false}
open={this.state.open}
onRequestClose={this.handleClose}
contentStyle={pageOptionsDialog.body}
>
<div>
<AutoSizer>
{({ width, height }) => (
<VirtualScroll
id="virtualScroll"
onRowsRendered={this.props.loadNextPage}
rowRenderer={this.rowRenderer}
height={height}
rowCount={this.props.rowCount}
rowHeight={30}
width={width}
/>
)}
</AutoSizer>
</div>
</dialog>
)}