using react-select as select only without option for entries
Hey, I'm trying to prevent the user from any type of entries inside the input, so react-select will be used as a simple
/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.
@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 to false, 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.
yeah I missed this option, thanks again!
@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
isSearchableprop. 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!!!
For me passing isSearchable didn't work, what worked was searchable . Here is the code snippet <Select {...otherProps} searchable={false} /> .. thanks!
@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
isSearchableprop. 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, this was exactly what I needed 👍
@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
isSearchableprop. 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.