title: Passing value to state using react-select
body: <p>I'm new to react and trying to learn on my own. I started using react-select to create a dropdown on a form and now I'm trying to pass the value of the option selected. My state looks like this.</p>
  
  <pre><code>this.state = {
    part_id: "",
    failure: ""
  };
  </code></pre>
  
  <p>Then in my render</p>
  
  <pre><code>const {
    part_id,
    failure
  } = this.state;
  </code></pre>
  
  <p>My form looks has 2 fields</p>
  
  <pre><code>&lt;FormGroup&gt;
    &lt;Label for="failure"&gt;Failure&lt;/Label&gt;
    &lt;Input
      type="text"
      name="failure"
      placeholder="Failure"
      value={failure}
      onChange={this.changeHandler}
      required
      /&gt;
    &lt;/FormGroup&gt;
    &lt;FormGroup&gt;
    &lt;Label for="part_id"&gt;Part&lt;/Label&gt;
    &lt;Select
      name="part_id"
      value={part_id}
      onChange={this.changeHandler}
      options={option}
    /&gt;
    &lt;/FormGroup&gt;
  </code></pre>
  
  <p>the <code>changeHandler</code> looks like this</p>
  
  <pre><code>changeHandler = e =&gt; {
    this.setState({ [e.target.name]: e.target.value });
  };
  </code></pre>
  
  <p>The change handler works fine for the input but the Select throws error saying cannot read property name.  I went through the API docs and came up with something like this for the Select onChange</p>
  
  <pre><code>onChange={part_id =&gt; this.setState({ part_id })}
  </code></pre>
  
  <p>which sets the part_id as a label, value pair. Is there a way to get just the value? and also how would I implement the same with <code>multiselect</code>?</p>