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

How to use virtual lists to avoid rendering lag caused by excessive elements #335

Open
AH-dark opened this issue Jan 2, 2025 · 0 comments

Comments

@AH-dark
Copy link

AH-dark commented Jan 2, 2025

In scenarios where a large number of elements need to be displayed in a user interface, rendering all elements at once can cause performance issues, such as lag or freezing. To address this, virtual lists can be implemented to improve rendering efficiency by only loading and displaying elements visible within the viewport.

I encountered this issue while using the Combobox component from shadcn/ui. Its Command component relies on cmdk, but I was unable to implement a virtualized list for selecting time zones. The list contains thousands of time zones, leading to rendering lag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant