Skip to content

using react-select as select only without option for entries #3147

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

Closed
dannyblv opened this issue Oct 28, 2018 · 6 comments
Closed

using react-select as select only without option for entries #3147

dannyblv opened this issue Oct 28, 2018 · 6 comments

Comments

@dannyblv
Copy link

dannyblv commented Oct 28, 2018

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 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.

@cutterbl
Copy link
Contributor

cutterbl commented Oct 29, 2018

@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.

@dannyblv
Copy link
Author

yeah I missed this option, thanks again!

@vikjs
Copy link

vikjs commented Jun 24, 2020

@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.

thank you!!!

@just-be-weird
Copy link

just-be-weird commented Mar 22, 2021

For me passing isSearchable didn't work, what worked was searchable . Here is the code snippet <Select {...otherProps} searchable={false} /> .. thanks!

@premraval-pr
Copy link

@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.

Thank You, this was exactly what I needed 👍

@christinavarghese06
Copy link

@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.

Thank you so much , wasted hours to resolve this issue. This really helped.

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

No branches or pull requests

6 participants