title: semantic ui react Setting dropdown value to state
body: <p>how to have dropdowns selected value in state.here is my code iam getting value for name field but dropdown not working, can anyone find out what i am missing?</p>
  
  <p>MyComponent.js</p>
  
  <pre><code>import React,{Component} from 'react';
  
  class MyComponent extends Component{
  state={
     data:{
         name:'',
         subject:''  
     }
  }
  
   onChange = e =&gt;
      this.setState({
          data: { ...this.state.data, [e.target.name]: e.target.value }
      },()=&gt;{
          console.log(this.state.data);
      }
      )
  
  render(){
  const {data}=this.state;
  const subjects= [
                {text: '1',value: 'kannada'},
                {text: '2', value: 'english'},
                {text: '3',value: 'hindhi'}
              ]
  return(
  &lt;div&gt;
              &lt;Input 
               name="name"
               onChange={this.onChange} 
               placeholder='Your name ...' 
              /&gt;
              &lt;Dropdown 
               placeholder='Select Subject'
               name="subject"
               onChange={this.onChange}
               selection 
               options={subjects} 
               /&gt;
  &lt;/div&gt;
  
  )
  }
  }
  export default MyComponent;
  </code></pre>
  
  <p>how to have selected dropdown value in state?, iam getting changed value for name field but for dropdown not getting.</p>