Set height of select2
<p>How to increase the <em>height</em> of the select2 suggestion dropdown?</p>

<p>I tried the idea proposed at <a href="https://github.com/select2/select2/issues/144" rel="nofollow">https://github.com/select2/select2/issues/144</a>:</p>

<pre><code>.select2-results {
  max-height: 500px;
}
</code></pre>

<p>However, that does not work. If I instead set the <code>min-height</code> property, the size is increased, however, I do not want to have a 500px huge dropdown if there are only 1 or 2 items...so <code>min-height</code> is not really an option.</p>

<p>I want the dropdown to dynamically adjust its height to the content, but increase its height up to 500px before a scrollbar is displayed.</p>