DEV Community

DeylEnergy
DeylEnergy

Posted on

AutoSizer of react-virtualized doesn't give free space to its child

Hello, guys. Can't figure out what is wrong with my code, but AutoSizer component doesn't work as intended. The children should take free space (horizontally and vertically), to make it obvious I set background to green. Read the documentation, did it exactly as it advises, can't make it work though. Would be glad if somebody points out where I did a mistake. Thanks.
Codesandbox - https://codesandbox.io/s/3y6m5

Top comments (1)

Collapse
 
stereobooster profile image
stereobooster

theguardian.com/world/shortcuts/20...

solution to your problem

- {(width, height) => (
+ {({width, height}) => (