2015-05-06 02:19:05 +03:00
|
|
|
<section>
|
|
|
|
|
|
|
|
<h1 id="hide-search">Hiding the search box</h1>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Select2 allows you to hide the search box depending on the number of
|
|
|
|
options which are displayed. In this example, we use the value
|
|
|
|
<code>Infinity</code> to tell Select2 to never display the search box.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<div class="s2-example">
|
|
|
|
<p>
|
|
|
|
<select class="js-example-basic-hide-search js-states form-control"></select>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
2016-01-31 02:09:01 +03:00
|
|
|
{% highlight js linenos %}
|
2015-05-06 02:19:05 +03:00
|
|
|
$(".js-example-basic-hide-search").select2({
|
|
|
|
minimumResultsForSearch: Infinity
|
|
|
|
});
|
2016-01-31 02:09:01 +03:00
|
|
|
{% endhighlight %}
|
2015-05-06 02:19:05 +03:00
|
|
|
</section>
|