title: Updating Data in a Table React Material UI
body: <p>I have a list of entries that I am displaying in a table format on the page. I plan to give user ability to edit any of the items in the list, so I display each cell inside this Table like this:</p>
  
  <pre><code>&lt;TableCell&gt;
       &lt;TextField id="standard-bare" defaultValue={items.data[i].firm} margin="normal" /&gt;
  &lt;/TableCell&gt;
  </code></pre>
  
  <p>Then I have the below icon all the way right in that each row</p>
  
  <pre><code>&lt;IconButton onClick={() =&gt; this.UserEdit(items.data[i])}&gt;
       &lt;Check color="action" /&gt;
  &lt;/IconButton&gt;
  </code></pre>
  
  <p>so when user clicks the Checkmark above, below function kicks in.</p>
  
  <pre><code>UserEdit(id) {
      console.log(id);
  }
  </code></pre>
  
  <p>So ideally I need to get all the new values for these fields so I can run a API call to update the Database with that information. Right now, each time I click on check, I get old values (values these fields had when they first loaded). How can I get the new values?</p>