Is there a way to auto size the scroll area to parent?
Similar to how you might use react-window and AutoSizer to create a virtualized list that fits inside it's parent element, is there a way within Virtual's existing framework to do the same?
As an example, say I have a flex box layout and the height of the container element is set to 100vh. Ideally I would like Virtual to always take up all the vertical space it has and render rows accordingly.
3 Replies
quickest-silverOP•3y ago
Yup. Figured that would be the case. My only issue with Autosizer is it's relative lack of active development and whether it's going to remain future proof.
I would also point out that other libs doing similar things (react-virtuoso for example) do handle this out of the box so it would be great to eventually see it in Virtual
xenial-black•3y ago
frosty-morse-scvryz
CodeSandbox is an online editor tailored for web applications.
xenial-black•3y ago
Basic create a div to take remaining space, use it as scroll element