title: Select value not changed on state update ReactJS
body: <p>I have no idea how to fix this thing
  have been spent more than an hours to solve this problem
  but none of the solution fix this</p>
  
  <p>So i have a combo box (Select tag element) which i would like to change the value when a modal box is opened. </p>
  
  <p><strong>I have already implement defaultValue to set the value of the combobox but it won't change. However on other input such as the notes / amount it can get the defaultValue and set it to the element.</strong></p>
  
  <p><em>I have try to debug the this.currState.deposit_type_id and i get the right value</em></p>
  
  <p>But in fact it won't change</p>
  
  <p>it always refer to the default value</p>
  
  <p>I have made several type of this thing but none of them has ever had this bug</p>
  
  <p>Here's the screenshot for the code and the image</p>
  
  <p><a href="https://i.stack.imgur.com/7ul9k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7ul9k.png" alt="These are the code to pass the data from parent&#39;s component, and deposit type for all the value i will put on the combo box"></a></p>
  
  <p>This is the code to pass the data from parent's component, and deposit type for all the value i will put on the combo box</p>
  
  <p><a href="https://i.stack.imgur.com/sEqw1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sEqw1.png" alt="enter image description here"></a></p>
  
  <p>This is the code that i used for set the default value when the modal box is opened</p>
  
  <p><a href="https://i.stack.imgur.com/Ay9LX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ay9LX.png" alt="enter image description here"></a></p>
  
  <p>This is the result, it supposed to choose "Kas Besar", yet it choose "Deposit Type" instead </p>