title: Material UI - how to disable select on condition
body: <p>I have my component which uses <code>Select</code> from the MUI</p>
  <pre><code>import Select from &quot;@material-ui/core/Select&quot;;
  
  export class RowSelectComponent extends React.Component {
      render() {
          const {details, classes, name, displayName, values, updateScenarioDetailsField, readOnly=false} = this.props;
          return &lt;FormRow&gt;
              &lt;FormLabel&gt;{displayName}&lt;/FormLabel&gt;
              &lt;FormContent&gt;
                  &lt;Select
                      value={details &amp;&amp; details[name]}
                      onChange={(event) =&gt; {
                          updateScenarioDetailsField(name, event.target.value);
                      }}
                      className={classes.input}
                  &gt;   
                      {values &amp;&amp; values.map((value, index) =&gt;
                          &lt;MenuItem key={index} value={value}&gt;{value}&lt;/MenuItem&gt;
                      )}               
                  &lt;/Select&gt;&lt;/FormContent&gt;
          &lt;/FormRow&gt;;
      }
  }
  </code></pre>
  <p>I want to be able to disable the select when the variable <code>readOnly</code> is true. It works when I write it like:</p>
  <pre><code>                     &lt;Select
                          value={details &amp;&amp; details[name]}
                          onChange={(event) =&gt; {
                              updateScenarioDetailsField(name, event.target.value);
                          }}
                          className={classes.input}
                          disabled
                      &gt;  
  </code></pre>
  <p>but when I try to do it like this it deosn't work:</p>
  <pre><code>                        &lt;Select
                              value={details &amp;&amp; details[name]}
                              onChange={(event) =&gt; {
                                  updateScenarioDetailsField(name, event.target.value);
                              }}
                              className={classes.input}
                              disabled={readOnly}
                          &gt;  
  </code></pre>
  <p>How to solve it ?</p>