JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.55k stars 4.12k forks source link

Select becomes unusable with above 20000 options #5643

Open sorin-sabo opened 1 year ago

sorin-sabo commented 1 year ago

When react select has more than 20.000 options it is no longer usable. Render and search takes a lot of time, so users simply close the app because of this component. Please note, that there is a potential fix for this in PR #4515 but that was not merged. Currently developers have to integrate other components and packages just to fix this simple issue that already has a fix. In case possible, please have a look and merge that PR.

hichemfantar commented 1 year ago

Something like https://github.com/TanStack/virtual or https://github.com/bvaughn/react-virtualized could solve this problem.

JanderSilv commented 1 year ago

The problem with virtualized lists right now with React-Select is that looses keyboard navigation. I didn't find a workaround for it. https://stackblitz.com/edit/react-ts-sxucwt?file=App.tsx

hichemfantar commented 1 year ago

@JanderSilv Have you tried the libraries I provided? Maybe it's a react-virtuoso thing.

JanderSilv commented 1 year ago

I'll give a look, thanks. I've tried with react-window as well, and the same behavior happened.