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

Virtualization on web is incorrect #1462

Open
1 task done
Elabar opened this issue Jan 3, 2025 · 0 comments
Open
1 task done

Virtualization on web is incorrect #1462

Elabar opened this issue Jan 3, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Elabar
Copy link

Elabar commented Jan 3, 2025

Current behavior

Not working correctly on web. When I have a container that's 250px in height, rendering items with 125px in height should render a maximum of 6 items only. But it renders 50 items instead.

Image

Why 6 items? docs says:

FlashList in comparison will only draw 250px extra on the top and bottom irrespective of the screen size.

This might not be an issue if the item component is a simple component as shown in the reproduction. But if you are rendering images in 3x3 layout, it is going to destroy the performance.

Expected behavior

With the same configuration, it should render a maximum of 6 items only.

To Reproduce

Here's a simple expo snack to reproduce the issue.

Platform:

  • Web

Environment

@shopify/flash-list: 1.7.2

@Elabar Elabar added the bug Something isn't working label Jan 3, 2025
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

1 participant