Getting data from TableRow component in Material UI
<p>I'm using a Table component in the newest version of Material UI, and I'm not sure how I'm supposed to be acquiring data from a Table's row when it's selected.</p>

<p>The documentation mentions a prop for the Table component called <code>onRowSelection</code>, but it only gives you a RowNumber for the row that was selected, nothing else.</p>

<p>How are you supposed to make any use of this at all?  I don't understand how you're meant to grab say...the key prop that's set to the <code>TableRow</code> using nothing but the RowNumber prop of that same <code>TableRow</code>.</p>

<p>Code below shows how I'm rendering the table itself, and assigning the key:</p>

<pre><code>handleSelect(id) {
  console.log(id);
  this.props.dispatch({ type: 'SET_SELECTED_USER', user: id });
}

renderUsers() {
  if (this.props.users &amp;&amp; this.props.currentUser) {
    const currUser = this.props.currentUser.username;
    const userList = this.props.users.map((user) =&gt; {
      if (currUser !== user.username) {
        return (
          &lt;TableRow key={user._id}&gt;
            &lt;TableRowColumn&gt;{user.username}&lt;/TableRowColumn&gt;
            &lt;TableRowColumn&gt;{user.roles[0]}&lt;/TableRowColumn&gt;
          &lt;/TableRow&gt;
        );
      }
    });
    return userList;
  }
}
</code></pre>

<p>I just don't understand how the RowNumber of the row being selected is supposed to help me whatsoever, when I need to access they key of the row instead.</p>

<p>Any assistance would be really appreciated!  Thanks!</p>

<p>Docs for Table:  <a href="http://www.material-ui.com/#/components/table" rel="noreferrer">http://www.material-ui.com/#/components/table</a></p>