<div class="col-md-3 col-sm-12 mb-4">
<div className='floating-label'>
<select className='floating-select' onChange={formik.handleChange} name="select_employee" placeholder=" " onSubmit={setSelectedOption} closeMenuOnSelect={false} noOptionsMessage={()=> "No Employee Available"} required isMulti isSearchable // name="select_employee" // options={optionData} // className="basic-multi-select" // classNamePrefix="select" // placeholder=" " // onSubmit={setSelectedOption} // closeMenuOnSelect={false}
// noOptionsMessage={() => "No Employee Available"} styles={{ placeholder: (baseStyles) => ({ ...baseStyles, // color: "#027581", }), control: (baseStyles) => ({ ...baseStyles, backgroundColor: "transparent", borderStyle: "none", borderWidth: "none",
borderRadius: '0px', borderColor:'none', boxShadow: 'none', borderBottom: '1px solid #757575', transition: 'background-color 0.2s ease-in-out', '&:hover': { backgroundColor: "none", }, }), multiValueRemove: (baseStyles) => ({ ...baseStyles, color:
"#000", }), multiValueGeneric: (baseStyles) => ({ ...baseStyles, color: "#fff", }), menuList: (baseStyles) => ({ ...baseStyles, backgroundColor: "#f3f3f9", }), option: (baseStyles, state) => ({ ...baseStyles, color: state.isFocused ? '#fff' : '#000',
backgroundColor: state.isFocused ? '#1e90ff' : '#f3f3f9' }) } } >
<option value=''> </option>
{optionData.map((selectEmployee, index) => (
<option key={index} value={selectEmployee.value}>{selectEmployee.label} </option>
))}</select>
<span class="highlight"></span>
<label>Select Employee</label>
</div>
</div>
best solution and simple learning