|
@@ -486,7 +486,8 @@ $(".js-programmatic-multi-clear").on("click", function () { $exampleMulti.val(nu
|
|
|
</script>
|
|
|
</div>
|
|
|
</section>
|
|
|
- <section id="multiple_max" class="row">
|
|
|
+
|
|
|
+ <section id="multiple-max" class="row">
|
|
|
<div class="col-md-4">
|
|
|
<h1>Limiting the number of selections</h1>
|
|
|
<p>Select2 multi-value select boxes can set restrictions regarding the maximum number of options selected.
|
|
@@ -509,6 +510,33 @@ $(".js-example-basic-multiple-limit").select2({
|
|
|
</div>
|
|
|
</section>
|
|
|
|
|
|
+ <section id="hide-search" class="row">
|
|
|
+ <div class="col-md-4">
|
|
|
+ <h1>Hiding the search box</h1>
|
|
|
+
|
|
|
+ <p>
|
|
|
+ Select2 allows you to hide the search box depending on the numbeer 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>
|
|
|
+
|
|
|
+ <p>
|
|
|
+ <select class="js-example-basic-hide-search js-states form-control"></select>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-8">
|
|
|
+ <h2>Example code</h2>
|
|
|
+
|
|
|
+ <pre data-fill-from=".js-code-hide-search"></pre>
|
|
|
+
|
|
|
+<script type="text/x-example-code" class="js-code-hide-search">
|
|
|
+$(".js-example-basic-hide-search").select2({
|
|
|
+ minimumResultsForSearch: Infinity
|
|
|
+});
|
|
|
+</script>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+
|
|
|
<section id="events" class="row">
|
|
|
<div class="col-md-4">
|
|
|
<h1>Events</h1>
|
|
@@ -1089,6 +1117,10 @@ $.fn.select2.amd.require(
|
|
|
matcher: oldMatcher(matchStart)
|
|
|
});
|
|
|
|
|
|
+ $(".js-example-basic-hide-search").select2({
|
|
|
+ minimumResultsForSearch: Infinity
|
|
|
+ });
|
|
|
+
|
|
|
$diacritics.select2();
|
|
|
|
|
|
$language.select2({
|