title: initial values from state of material-ui dropdown in redux-form
body: <p>I have a material-ui dropdown menu inside a redux-form, and I want to initialize its value.
  I am getting both the value that I want [<code>exercise.exercise_type_id</code> and <code>exercise.exercise_type_name</code>] and the list of available options [<code>types</code>, array of objects with <code>id</code> and <code>name</code> properties, among others] by dispatching two actions:</p>
  
  <pre><code>componentWillMount(){
      this.props.actions.exercise.fetchInfo(this.props.params.exerciseId);
      this.props.actions.exercise.fetchAllTypes();
  };
  </code></pre>
  
  <p>Ideally I would like to have <strong>somewhere</strong> something like:</p>
  
  <pre><code>_.map(this.props.types, (type) =&gt;{
              if (type.id == this.props.exercise.exercise_type_id){
                  this.setState({
                      dropDownValue: type.name
                  });
              }
          }); 
  </code></pre>
  
  <p>but only for the initial state, since we want to handle changes with <code>handleDropDownChange</code>.</p>
  
  <p>[Of course I would appreciate something like</p>
  
  <pre><code>state = {
      dropDownValue: {this.props.exercise.exercise_type_name}
  };
  </code></pre>
  
  <p>but I know this is an anti-pattern. But anyway it doesn't work, props are still empty.]</p>
  
  <p>My dropdown is like this:</p>
  
  <pre><code>&lt;DropDownMenu {...exercise_type_name} //does nothing
          value={dropDownValue}
          onChange={onDropDownChange}&gt;
      {_.map(types, (type) =&gt; {
          return &lt;MenuItem key={type.id} value={type.name} primaryText={type.name}/&gt;;
      })}
  </code></pre>
  
  <p></p>
  
  <p>More code:</p>
  
  <pre><code>//...
  
  state = {
          dropDownValue: ''
      };
  
  //...
  
  handleDropDownChange = (event, index, value) =&gt; {
          this.setState({
              dropDownValue: value
          });
      };
  
  //...
  
    function mapStateToProps(state){
      return {
          exercise: getExerciseInfo(state),
          initialValues: getExerciseInfo(state),
          request: getExRequest(state),
          types: getExTypes(state)
      };
  }
  
  //....
  
  export default reduxForm({
      form: 'EditExerciseForm',
      fields: ['exercise_type_name', 'max_errors_percentage', 'min_speed']
  }, mapStateToProps, mapDispatchToProps)(ExerciseEdit);
  </code></pre>