title: Material-ui Switch inside a Table
body: <p>I have the below code to display switch state inside a table in material ui. But I am stuck on how to add onChange behaviour to the individual row switchs. Any advice on the same?</p>
  
  <pre><code>    &lt;Paper className={classes.root}&gt;
                      &lt;Table className={classes.table}&gt;
                          &lt;TableHead&gt;
                          &lt;TableRow &gt;
                              &lt;TableCell&gt;&lt;/TableCell&gt;
                              &lt;TableCell  className={classes.head} &gt;Accept Orders&lt;/TableCell&gt;
                              &lt;TableCell   className={classes.head} &gt;Process Send Queue&lt;/TableCell&gt;
                          &lt;/TableRow&gt;
                          &lt;/TableHead&gt;
                          &lt;TableBody className={classes.body}&gt;
                          {array.map(row =&gt; {
                              return (
                              &lt;TableRow key={row.cryptoCode} className={classes.row}&gt;
                                  &lt;TableCell component="th" scope="row"&gt;{row.cryptoCode}&lt;/TableCell&gt;
                                  &lt;TableCell&gt;        
                                      &lt;Switch
                                          checked={row.acceptOrders}
                                          onChange={this.handleChange}
                                          // value="checkedA"
                                       /&gt;
                                  &lt;/TableCell&gt;
                                  &lt;TableCell&gt;                               
                                      &lt;Switch
                                          checked={row.processSendQueue}
                                          onChange={this.handleChange}
                                          // value="checkedB"
                                       /&gt;
                                  &lt;/TableCell&gt;
                              &lt;/TableRow&gt;
                              );
                          })}
                          &lt;/TableBody&gt;
                      &lt;/Table&gt;
   &lt;/Paper&gt;
  </code></pre>