question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Add maxOptions prop

See original GitHub issue

Prop to restrict the number of results

We need a way to restrict the number of results rendered on the Select/Async select components.

Use case

This is extremely useful if the number of options is too high and if someone wants to limit the items being displayed to improve performance.

API

Add maxOptions optional prop for Select/AsyncSelect which takes a number.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
JalilArfaouicommented, Nov 23, 2018

Hi @Chopinsky @nithinpeter

I needed this too, so I pushed this : https://github.com/JedWatson/react-select/pull/3229

Actually, I need it on a non-async select because sometimes I have > 10 000 options, and for performance reason I want to limit the number of shown options, and let the user type to find more …

0reactions
ebonowcommented, Feb 5, 2021

Greetings, I believe the use case for this would be best suitable as a new prop in filterOptions

  • The select should only be responsible for the number of options after filtering
  • The ordering of the results would likely need to be defined which exists as another Feature Request so it is likely these two would be related.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request: Allow for sorting options in filterOptions prop
In v1 overriding the standard filterOptions meant that you could return the options in a completely different order based on the search, whereas...
Read more >
Feature Request Content - Instabug
This page covers the content found in a feature request. Suggest Edits. Users can add new feature requests or comment on existing ones....
Read more >
Feature Request/Bug Report Form - Adobe
Welcome to the Feature Request and Bug Report Submission Form. Use this form to request new features or suggest modifications to existing features....
Read more >
OpenAPI Properties in Use | Creating REST Services
This appendix lists the properties of the OpenAPI 2.0 specification that the API management tools use when generating the REST service classes.
Read more >
Use Features to Organize Options Unit - Trailhead - Salesforce
You can add lots of options or just a few to a bundle. ... If a feature has a Max Options of 1,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found