hsuanyi-chou / shadcn-ui-expansions

More components built on top of shadcn-ui.
https://shadcnui-expansions.typeart.cc/
MIT License
560 stars 25 forks source link

Multi Selector slowing down when options are too large #85

Closed devguerreiro closed 1 month ago

devguerreiro commented 1 month ago

I have a list of about 5.5k options (cities), and it is causing the component to slow down. How can I work around this? Maybe Virtual Scroll?

devguerreiro commented 1 month ago

I fixed this problem using the async search, so now instead showing all possible options, I'm allowing the user to search for it.

https://shadcnui-expansions.typeart.cc/docs/multiple-selector#Async%20Search%20with%20Debounce