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

Support large data sets in Autocomplete #1909

Closed
mimarz opened this issue Jan 24, 2022 · 5 comments · Fixed by #2689
Closed

Support large data sets in Autocomplete #1909

mimarz opened this issue Jan 24, 2022 · 5 comments · Fixed by #2689
Assignees
Labels
core-react eds-core-react ✨ enhancement Enhancements for our existing components 💡 feature request

Comments

@mimarz
Copy link
Contributor

mimarz commented Jan 24, 2022

Selects/Autocompletes/Comboboxes are in most cases used for selecting tags in Equinor. Tags are usually very large data sets so we should probably do some optimising for our upcoming Autocomplete to support large data sets.

Examples from downshift using react-window

@mimarz mimarz added core-react eds-core-react ✨ enhancement Enhancements for our existing components labels Jan 24, 2022
@mimarz mimarz changed the title Support large data sets in Combobox Support large data sets in Autocomplete Feb 18, 2022
@sindre-nistad
Copy link

We have a similar problem in a project, where ~5000 options is available in some cases.
This causes the component to be very slow, and only render part of the items.

@oddvernes
Copy link
Collaborator

Interesting! Well since we are currently looking at lazy-rendering table in #2561 there may be some lessons learned there. I am moving this ticket higher up from the debths of the backlog 👍

@oddvernes
Copy link
Collaborator

@sindre-nistad We have a test release out now if you have the opportunity to check it out 👍 @equinor/eds-core-react@next. Currently virtualization is always on just to avoid bloating this component with even more code but I may have to add a virtualize prop if this does not work in some cases like ssr (yet to be tested)

@sindre-nistad
Copy link

Great! I'll check it out

@sindre-nistad
Copy link

Initial testing shows great promise. I've tried it with a dropdown with ~5000 elements, and one with ~1800 elements.
Scrolling, and really fast scrolling does not cause the app to slow to a crawl.
If I let the scroll wheel fly freely, the elements seem to render occasionally, but it still scrolls down. During really fast scroll the elements may disappear completely.
Searching, and selecting works smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-react eds-core-react ✨ enhancement Enhancements for our existing components 💡 feature request
Projects
None yet
3 participants