title: react-select: disable dropdown list
body: <p>Is there a way to disable the dropdown list?
  I didn't find any props that can help me.</p>
  <p>In particular, I would like to disable the dropdown list when user has selected more than 5 elements.</p>
  <p>I created <a href="https://codesandbox.io/s/ecstatic-hopper-eupib?file=/example.js" rel="nofollow noreferrer">this codesandbox</a>. It doesn't really work because it's not linked to a state:</p>
  <pre><code>const limit = 3;
  const defaults = [colourOptions[2], colourOptions[3]];
  
  export default () =&gt; (
    &lt;Select
      defaultValue={defaults}
      isMulti
      name=&quot;colors&quot;
      options={colourOptions}
      className=&quot;basic-multi-select&quot;
      classNamePrefix=&quot;select&quot;
      isSearchable={defaults.length &lt; limit}
      // disableDropdown={defaults.length &gt; limit} // &lt;-- something like this
    /&gt;
  )
  </code></pre>