bvaughn / react-virtualized

React components for efficiently rendering large lists and tabular data
http://bvaughn.github.io/react-virtualized/
MIT License
26.12k stars 3.06k forks source link

AutoSizer should use default values if computed values are 0 #1703

Open Nokel81 opened 2 years ago

Nokel81 commented 2 years ago

Feature Request

If AutoSizer is used as a child to a component that has overflow: "scroll" it computes values that are 0. This makes sense because there is no upper bound the the size. However, when used with items like VariableSizeList from "react-window" nothing is rendered.

It would be nice if the defaultHeight or defaultWidth props (or maybe some new props) could be used so that in the case where the height is incalculable there is a fallback value

alexander-agysov commented 2 years ago

Did you try 'estimatedRowSize' prop for a List? https://github.com/bvaughn/react-virtualized/blob/master/docs/List.md

Nokel81 commented 2 years ago

I wasn't using that component so no