React-window: Why the static list sizing?

Created on 20 Apr 2020  路  1Comment  路  Source: bvaughn/react-window

Is there some technical limitation that forces the requirement of providing a a width/height/item-height. Or is there something i'm missing that would allow those to be dynamically calculated.

Background:

Basically here is the issue I am running into. I have a filterable list of a couple thousand text time. I dont know how the height of each item, since it is based on how long the text is, user font settings, zoom level, etc. Also, I dont nesscarily know the size of the container, since when I filter items by search query, the number of items can shrink below a full container.

Also, not as big of a deal but my height/width can change since it uses standard responsive coding using flex box.

Question

Im wondering why does the API here require a width/height. What if it took one parameter
virtualizedItemCount. Which would be the size in number of list items that is being rendered at one time. From there just let the browser calculate width/height, and use those values.

Most helpful comment

I'd also benefit from being able to set height to e.g. "100%"

>All comments

I'd also benefit from being able to set height to e.g. "100%"

Was this page helpful?
0 / 5 - 0 ratings