buildo / bento-design-system

A customizable and extensible Design System framework for React.js projects
https://www.bento-ds.com
MIT License
107 stars 12 forks source link

SelectField is laggy when the number of items is very large #318

Open gabro opened 2 years ago

gabro commented 2 years ago

For example, if you have a SelectField with all the countries in the world, then it starts to lag.

This is due to the lack of virtualization in react-select, see https://github.com/JedWatson/react-select/issues/3128 and https://github.com/JedWatson/react-select/issues/2850 for more info.

Judging from those threads, a promising solution would be to have a custom MenuList built on top of react-virtualized's List

marcopiii commented 2 years ago

I reproduced the bug in this playroom