Currently need the placeholder to remain the placeholder until a user chooses an option, however at the moment the placeholder is removed as soon as the user clicks the dropdown box for options.
How can I keep it there until a user chooses an option?
In this code?
<Select
styles={customStyles}
class='flag-drop-down'
options={customOptions}
placeholder={<img src={GBSVG} alt="Flag" width="24" height="16" />}
isSearchable={false}
noOptionsMessage={() => <img src={GBSVG} alt="Flag" width="24"
height="16" />}
/>
Any help is greatly appreciated.
Thanks in advance!
Jake
Below is the example code from the official documentation, found under the Control section, if it is of any help. You might need to create a custom
ValueContainerand return the placeholder in it.Also, there is a similar question you can have a look at Keeping placeholder on react-select.