Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] GroupedVirtuoso increaseViewportBy top not increasing rendered items beyond current group #1209

Open
sterlingwalsh opened this issue Mar 12, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@sterlingwalsh
Copy link

sterlingwalsh commented Mar 12, 2025

Describe the bug

In a standard Virtuoso component, using increaseViewportBy renders additional items above the viewport. In GroupedVirtuoso, the additional items rendered stops at the beginning of the current group as rendered at the top of the viewport

Reproduction

https://codesandbox.io/p/sandbox/km9gvl

To Reproduce

Steps to reproduce the behavior:
In sandbox above, 4 buttons provided setting both virtuoso components (each with 10000 items) to the same scroll position and rendering the visible items as per the example in virtuoso docs. Large discrepancy in the starting rendered position, but expected discrepancy in ending position (as a result of group headers)

Expected behavior

as per the documentation https://virtuoso.dev/virtuoso-api/interfaces/GroupedVirtuosoProps/#increaseviewportby GroupedVirtuoso should pre-render items above the viewport corresponding to the provided size, not just the previous group

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Mac Sequoia.
  • Browser Chrome (latest)

Additional context
Add any other context about the problem here.

@sterlingwalsh sterlingwalsh added the bug Something isn't working label Mar 12, 2025
@petyosi
Copy link
Owner

petyosi commented Mar 12, 2025

The sandbox above must be private (quite an annoying default setting of codesandbox, I've done this as well).

@sterlingwalsh
Copy link
Author

sterlingwalsh commented Mar 12, 2025

The sandbox above must be private (quite an annoying default setting of codesandbox, I've done this as well).

yep, thats definitely a dumb setting (but I guess it really depends on the intended use of that sandbox at the time. o well). Updated, signed out myself and verified access

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants