petyosi / react-virtuoso

The most powerful virtual list component for React
https://virtuoso.dev
MIT License
5.17k stars 299 forks source link

[FEATURE] Able to style viewport #963

Closed nadenf closed 1 year ago

nadenf commented 1 year ago

Describe the bug Related to https://github.com/petyosi/react-virtuoso/issues/522.

When Virtuoso is used within Flex container it fails to scroll because the viewport height should be undefined or set to a fixed value.

It would be useful even without this issue to be able to set the style of the viewport e.g. add additional padding.

Could we allow viewPort to be a component that can be passed in to customise ?

nadenf commented 1 year ago

Happy to submit PR if you think it's worth it.

petyosi commented 1 year ago

When Virtuoso is used within Flex container it fails to scroll

Can you show me an example of that?

Related to https://github.com/petyosi/react-virtuoso/issues/522.

Can you elaborate?

joelworsham commented 9 months ago

Absolutely think this is worth it. I need to have the layout of header, content, and footer in a flex container, but I cannot style the viewport