title: Dropdown menu in React, filter through list
body: <p>I am building a rest countries app in react and I'm trying to filter by region through a list. I would like to use a dropdown menu. I have tried using react select, creating a new component, this is my code</p>
  <pre><code>const DropdownMenu = (props) =&gt; {
      const options = [
          '', 'Africa', 'America', 'Asia', 'Europe', 'Oceania'
        ];
      const defaultOption = options[0];
  
      const handleFilterInput = (event) =&gt; {
          let value = event.target.options;
          props.handleRegionSearch(value);  
      };
  
      return(
          &lt;div&gt;
              &lt;Select options={options} onChange={handleFilterInput} value={defaultOption} placeholder=&quot;Select a region&quot;/&gt;
          &lt;/div&gt;
      )
  }
  
  export default DropdownMenu;
  </code></pre>
  <p>My problem is, I can not get the value to change to the option selected, therefore it's impossible for me to filter the list I took from the api.
  Does anyone have a possible solution for this?
  Thanks</p>