-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Input filtering is laggy for large lists of options on v1.0.0-beta10 #807
Comments
Check out PR #859 (and the demo linked) which adds react-virtualized support. |
Update: If you're able to use react-select 1.0.0 beta, then you might be interested in trying a new HOC, react-virtualized-select. Does windowing/lazy rendering so it should help with the issue you're reporting. |
Chiming in after some time. I think this problem (slow filtering) comes down to how filtering is done within I've created some JS search libs (eg Perhaps that would be interest in trying to integrate one of these libs with If there's interest, I would be happy to take a stab at it. Let me know! |
To add a little more context... I like using high-order components for this sort of functionality because (a) it doesn't bloat or add complexity to the underlying library ( I was tentatively thinking of creating another light-weight lib that connects import React from 'react'
import VirtualizedSelect from 'react-virtualized-select'
import fastFilterOptions from 'react-select-fast-filter-options'
function MyComponent () {
return (
<VirtualizedSelect
{...props}
filterOptions={fastFilterOptions}
/>
)
} |
Thanks for the advice. I will try that. Still, I thought this might be an interesting performance degradation to look at, since the problem is not present on |
New high-order component available to hopefully speed things up a lot! Demo available here with 100,000 options: https://bvaughn.github.io/react-select-fast-filter-options/ Source and installation instructions here: https://github.com/bvaughn/react-select-fast-filter-options |
Going to close this issue since I've added a new section to the README making mention of this new library. Since I own |
Hi there, first of all, thank you for this beautiful React component.
Now, here's the problem with it ;)))
I have an options list with about 2000 items, e.g.
Then, simply render the
Select
component viaTyping something into the input feels very laggy on
v1.0.0-beta10
. Onv0.9.1
it is fine.It is really quiet significant of a difference.
v0.9.1
is really smooth, whilev1.0.0-beta10
is laggy.(If you need an actual production example I can sent you my data via e-mail, but I tried to construct data good enough to reproduce the problem above.)
The text was updated successfully, but these errors were encountered: