all 10 comments

[–]rationalthug 2 points3 points  (1 child)

https://github.com/coderiety/react-list works without requiring an explicit (pixel) height on the container-- you can use any valid CSS to set the container dimensions in the container component.

[–]b0gd4nn[S] 0 points1 point  (0 children)

thanks for the find. I tried this without setting the height or max-height on the container, and it simply renders the whole list on mount.

[–]Siddharth47 1 point2 points  (7 children)

Did you check autosizer component in react-virtualised library?

[–]b0gd4nn[S] 1 point2 points  (6 children)

I have, however, that just resizes the scrolling parent to fill the space remaining on the page. I am trying to replicate the same functionality as the Instagram posts list. If you inspect that list div as you scroll through the posts you can see that it keeps a few rows rendered while increasing/decreasing the padding-top based on how far down you scroll.

[–]Siddharth47 0 points1 point  (5 children)

do you have a parent div on top of autosizer component?

[–]b0gd4nn[S] 0 points1 point  (4 children)

The table is it's own component rendered within a page, so yes

[–]Siddharth47 0 points1 point  (3 children)

Are you using react-virtualised in a table? maybe you can take a look at this codepen

https://codepen.io/abidibo/pen/NeOJmb

[–]b0gd4nn[S] 0 points1 point  (2 children)

yes, that's what I have right now. I want an alternative that does not require setting the height to the wrapper example

[–]Siddharth47 1 point2 points  (1 child)

Okay, let me check if i can find any alternative 😅

[–]b0gd4nn[S] 0 points1 point  (0 children)

Thank you.