I have serchable dropdown list in react. for that I have used VirtualizedSelect the problem is onChange is not working.
import VirtualizedSelect from 'react-virtualized-select'
import "react-virtualized-select/styles.css";
import 'react-virtualized/styles.css'
<VirtualizedSelect
id="sponsor"
name="sponsor"
defaultValue="Please"
className="form-control"
placeholder="Sponsor"
options= { active && result.map((sponsor:Sponsor,index:number)=>
({label: sponsor.name, value: sponsor.name})
)}
onChange={ (e:any)=>{printValue(e)}}
}>
</VirtualizedSelect>
inside the printValue I am printing alert(e.target.value) and it is printing undefined.
const printValue=(e:any)=>{
alert("value is"+e.target.value);
}
also as of now list is coming like below.
I want it to make like below. I mean I want to add "Please select the sponsor"

can you please help me on the same?
if I am printing console.log(e.target.value) inside the method. it is throwing below error.
Edit1:- it is coming like below.



