title: searchable dropdown list in react
body: <p>I have serchable dropdown list in react. for that I have used <code>VirtualizedSelect</code> the problem is onChange is not working.</p>
  <pre><code>import VirtualizedSelect from 'react-virtualized-select'
  import &quot;react-virtualized-select/styles.css&quot;;
  import 'react-virtualized/styles.css'
  &lt;VirtualizedSelect
         id=&quot;sponsor&quot; 
         name=&quot;sponsor&quot;
         defaultValue=&quot;Please&quot;
         className=&quot;form-control&quot;
         placeholder=&quot;Sponsor&quot;
         options=  { active &amp;&amp; result.map((sponsor:Sponsor,index:number)=&gt;
             ({label: sponsor.name, value: sponsor.name})
         
         )} 
         onChange={ (e:any)=&gt;{printValue(e)}}
          }&gt;
  &lt;/VirtualizedSelect&gt;
  </code></pre>
  <p>inside the <code>printValue</code> I am printing <code>alert(e.target.value</code>) and it is printing <code>undefined</code>.</p>
  <pre><code>const printValue=(e:any)=&gt;{
      alert(&quot;value is&quot;+e.target.value);
  }
  </code></pre>
  <p>also as of now <code>list</code> is coming like below.</p>
  <p><a href="https://i.stack.imgur.com/OgeaM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OgeaM.png" alt="enter image description here" /></a></p>
  <p>I want it to make like below. I mean I want to add &quot;Please select the sponsor&quot;
  <a href="https://i.stack.imgur.com/JKKZ5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JKKZ5.png" alt="enter image description here" /></a></p>
  <p>can you please help me on the same?
  if I am printing <code>console.log(e.target.value)</code> inside the method. it is throwing below error.</p>
  <p><a href="https://i.stack.imgur.com/RElR4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RElR4.png" alt="enter image description here" /></a></p>
  <p>Edit1:-
  it is coming like below.</p>
  <p><a href="https://i.stack.imgur.com/udMfv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/udMfv.png" alt="enter image description here" /></a></p>