diff --git a/docs/_includes/options/dropdown/filtering.html b/docs/_includes/options/dropdown/filtering.html index 054ec19d..9a05511a 100644 --- a/docs/_includes/options/dropdown/filtering.html +++ b/docs/_includes/options/dropdown/filtering.html @@ -7,17 +7,49 @@ Can Select2 wait until the user has typed a search term before triggering the request? +
+$('select').select2({ + ajax: { + delay: 250 // wait 250 milliseconds before triggering the request + } +}); ++ {% include options/not-written.html %}
+$('select').select2({ + maximumInputLength: 20 // only allow terms up to 20 characters long +}); ++ {% include options/not-written.html %}
+$('select').select2({ + minimumResultsForSearch: 20 // at least 20 results must be displayed +}); ++ + {% include options/not-written.html %} + +
+$('select').select2({ + minimumResultsForSearch: Infinity +}); ++ {% include options/not-written.html %} \ No newline at end of file diff --git a/docs/_includes/options/dropdown/placement.html b/docs/_includes/options/dropdown/placement.html index 67c986c7..1962b49b 100644 --- a/docs/_includes/options/dropdown/placement.html +++ b/docs/_includes/options/dropdown/placement.html @@ -13,6 +13,12 @@ Can I pick an element for the dropdown to be appended to? +
+$('select').select2({ + dropdownParent: $('#my_amazing_modal') +}); ++ {% include options/not-written.html %}
+$('select').select2({ + selectOnClose: true +}); ++ {% include options/not-written.html %}
+$('select').select2({ + closeOnSelect: false +}); ++ {% include options/not-written.html %} \ No newline at end of file