title: Prevent event propagation on row click and dialog in material ui
body: <p>I'm using <a href="/questions/tagged/material-ui" class="post-tag" title="show questions tagged &#39;material-ui&#39;" rel="tag">material-ui</a> and I have a table with a button inside. The button opens a Dialog and I need to be able to support clicking on the table row.<br>
  The problem is that with Portals (in react) - <a href="https://github.com/facebook/react/issues/11387" rel="noreferrer">the events are propagated</a>, so clicking inside the Dialog (that was opened after clicking on the button) - the click event on the table-row will get fired.</p>
  
  <p>This is the row:</p>
  
  <pre><code>&lt;TableRow onClick={rowClick}&gt;
    &lt;TableCell&gt;Content 1&lt;/TableCell&gt;
    &lt;TableCell&gt;Row clicked {count} times&lt;/TableCell&gt;
    &lt;TableCell&gt;
      &lt;MyDialog /&gt;
    &lt;/TableCell&gt;
  &lt;/TableRow&gt;
  </code></pre>
  
  <p>This is the dialog:</p>
  
  <pre><code>&lt;&gt;
    &lt;IconButton onClick={handleClickOpen}&gt;
      &lt;EditIcon /&gt;
    &lt;/IconButton&gt;
    &lt;Dialog disableBackdropClick open={open} onClose={handleClose}&gt;
      &lt;DialogTitle&gt;Dialog&lt;/DialogTitle&gt;
      &lt;DialogContent&gt;Some content&lt;/DialogContent&gt;
      &lt;DialogActions&gt;
        &lt;Button onClick={handleClose}&gt;Cancel&lt;/Button&gt;
        &lt;Button onClick={handleClose}&gt;Save&lt;/Button&gt;
      &lt;/DialogActions&gt;
    &lt;/Dialog&gt;
  &lt;/&gt;
  </code></pre>
  
  <p>Here is a working example:<br>
  <a href="https://codesandbox.io/s/dazzling-hofstadter-gzwll" rel="noreferrer">https://codesandbox.io/s/dazzling-hofstadter-gzwll</a></p>
  
  <p>And this is an animated gif that shows the issue:<br>
  <a href="https://i.stack.imgur.com/Ro2yb.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/Ro2yb.gif" alt="enter image description here"></a></p>
  
  <p>I know I can set the "rowClick" on each cell (and leave the last cell without it) but this is just an example and I'm looking for a more generic solution.</p>