diff --git a/pages/11.searching/docs.md b/pages/11.searching/docs.md index 5f1af988..c8be27d6 100644 --- a/pages/11.searching/docs.md +++ b/pages/11.searching/docs.md @@ -125,7 +125,7 @@ You may limit the maximum length of search terms by using the `maximumInputLengt ``` $('select').select2({ - maximumInputLength: 20 // only allow terms up to 20 characters long + maximumInputLength: 20 // only allow terms up to 20 characters long }); ``` @@ -137,24 +137,48 @@ This option is useful for cases where local data is used with a small result set ``` $('select').select2({ - minimumResultsForSearch: 20 // at least 20 results must be displayed + minimumResultsForSearch: 20 // at least 20 results must be displayed }); ``` ## Hiding the search box -Select2 allows you to hide the search box depending on the number of options which are displayed. In this example, we use the value `Infinity` to tell Select2 to never display the search box. +### Single select + +For single selects, Select2 allows you to hide the search box using the `minimumResultsForSearch` configuration option. In this example, we use the value `Infinity` to tell Select2 to never display the search box.