Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I make the dropdown visible after entering one character in react-select?

I'm using react-select React component to display an autocomplete input field.

On focusing the react-select component input field, it will display all the options available which I don't want since the length of the data-set is in thousands. I want to display options only if the user enters at-least one character. Is there any way to do this? Or Is this a feature request that I'm supposed to raise?

Thanks in advance.

like image 789
Sreeraj Karichery Avatar asked Oct 29 '22 04:10

Sreeraj Karichery


People also ask

How do you auto select dropdown value in React?

Auto Select option from Dropdown means without forcing the user to click on any options, the option value is auto-populated. Material UI for React has this component available for us and it is very easy to integrate.

How do I hide the dropdown arrow in React select?

How do I get rid of the dropdown arrow in react? You can hide the dropdown arrow from the DropDownButton by adding class e-caret-hide to DropDownButton element using cssClass property.


1 Answers

Yes, add openOnClick={false} Prop to the Select.

open the options menu when the control is clicked (requires searchable = true)

like image 95
larswittenberg Avatar answered Nov 12 '22 22:11

larswittenberg