React-window: Question: Large lists with unknown sizes of items

Created on 10 Aug 2020  路  1Comment  路  Source: bvaughn/react-window

I know there is the VariableList component, but i have a list of 1000 items and their sizes arent known until the rows are mounted onto the dom (unable to predict the size of each item). Since the variablelist still expects the itemSize prop, is there any way to get around this?

Most helpful comment

image

I have created the VariableSizeList that supports items with dynamic and unpredictable size. With this component, you can easily set row item size when it mounted via setItemSize props.

However, when I pass the style props to the row item component, the height of it always fixed.
When I don't pass the style props to the row item component, it was rendered perfectly but the flash appears when scrolling

I have no idea to fix the flash without passing the style props, any help would be appreciated!

>All comments

image

I have created the VariableSizeList that supports items with dynamic and unpredictable size. With this component, you can easily set row item size when it mounted via setItemSize props.

However, when I pass the style props to the row item component, the height of it always fixed.
When I don't pass the style props to the row item component, it was rendered perfectly but the flash appears when scrolling

I have no idea to fix the flash without passing the style props, any help would be appreciated!

Was this page helpful?
0 / 5 - 0 ratings