using react-select as select only without option for entries
See original GitHub issueHey, I’m trying to prevent the user from any type of entries inside the input, so react-select
will be used as a simple <Select> html tag, I faced this issue while I was trying to search for solution
/issues/758
but its mainly about auto-complete … I want to prevent the use of typing anything at all (when opening the select), just a selection. and idea how can it be done ?
thanks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
React Select with options outside - Prepsheets
Setting up react-select to render options outside the select for more space.
Read more >Advanced - React Select
A flexible and beautiful Select Input control for ReactJS with multiselect, autocomplete and ajax support.
Read more >How to use react-select without options list? - Stack Overflow
import CreatableSelect from 'react-select/creatable'; export type OptionType = { value: string; label: string; __isNew__?
Read more >react-select: An introduction - LogRocket Blog
In the App.js file, we import two items at the top of the file, the react and react-select package respectively like this:
Read more >Forms - React
In HTML, form elements such as <input> , <textarea> , and <select> ... kept in the state property of components, and only updated...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Danny-weebo For future reference, questions like this are best left for StackOverflow, and don’t really fall into the repo bug tracker. That said, what you’re looking for is the
isSearchable
prop. If you set this tofalse
, then the user will use your select like a standard select, without the ability to type and filter in the Control.<Select {...otherProps} isSearchable={false} />
The API docs are really helpful here. It’s a lot of information (it’s a powerful component), but worth reading through.
Thank you so much , wasted hours to resolve this issue. This really helped.