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

Add resultLimit prop limiting the amount of rendered options #4515

Closed
wants to merge 6 commits into from

Conversation

h3rmanj
Copy link

@h3rmanj h3rmanj commented Mar 22, 2021

Add a resultLimit prop that prevents rendering too many results. Useful if the number of options are in the thousands.

Indirectly addresses #4504
Addresses #4516

@changeset-bot
Copy link

changeset-bot bot commented Mar 22, 2021

⚠️ No Changeset found

Latest commit: 8c2beb0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 22, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 8c2beb0:

Sandbox Source
react-codesandboxer-example Configuration

@Methuselah96
Copy link
Collaborator

Could you filter the options before passing them into the Select component?

@h3rmanj
Copy link
Author

h3rmanj commented Mar 22, 2021

Could you filter the options before passing them into the Select component?

I could, yeah. But it's incredibly frustrating that I'd have to hoist and manage input state and search logic, which Select already has, just because i want to limit the amount of options that are rendered. This feature would be really helpful to have available, when dealing with thousands of options, which is often the case.

Also, being able to limit number of rendered results is an easy way to optimize lists that are more relevant for searching than browsing. Even my battlestation is sluggish at best when dealing with large lists; https://codesandbox.io/s/react-codesandboxer-example-forked-sogqi

Just setting a hard limit with resultLimit makes it way more responsive.

@h3rmanj
Copy link
Author

h3rmanj commented Jul 9, 2021

Closing because of the major rewrite in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants