diff --git a/docs/_includes/options-new/core/amd-support.html b/docs/_includes/options-new/core/amd-support.html index 0f508ff8..9dfd2759 100644 --- a/docs/_includes/options-new/core/amd-support.html +++ b/docs/_includes/options-new/core/amd-support.html @@ -31,4 +31,8 @@ $.fn.select2.defaults.set('amdLanguageBase', 'select2/i18n/');

Due to a bug in older versions of the r.js build tool, Select2 was sometimes placed before jQuery in then compiled build file. Because of this, Select2 will trigger an error because it won't be able to find or load jQuery.

+ +

+ You can fix this issue by upgrading to a newer version of the r.js build tool. +

\ No newline at end of file diff --git a/docs/_includes/options-new/core/data-attributes.html b/docs/_includes/options-new/core/data-attributes.html index b4a4c3bd..9a95e105 100644 --- a/docs/_includes/options-new/core/data-attributes.html +++ b/docs/_includes/options-new/core/data-attributes.html @@ -2,24 +2,24 @@

Can I declare my configuration within the HTML?

- +

It is recommended that you declare your configuration options for Select2 when initializing Select2. You can also define your configuration options by using the HTML5 data-* attributes, which will override any options set when initializing Select2 and any defaults.

- +

How should camelCase options be written?

- +

This means that if you declare your <select> tag as...

-<select data-tags="true" data-placeholder="Select an option"></select>
+<select data-tags="true" data-placeholder="Select an option" data-allow-clear="true"></select>
 

@@ -29,14 +29,15 @@

 $("select").select2({
   tags: "true",
-  placeholder: "Select an option"
+  placeholder: "Select an option",
+  allowClear: true
 });
 
- +

Are options with nested configurations supported?

- +

You can also define nested configurations, which are typically needed for options such as AJAX. Each level of nesting should be separated by two diff --git a/docs/_includes/options-new/core/options.html b/docs/_includes/options-new/core/options.html index e9bec7e0..2b7cb1f4 100644 --- a/docs/_includes/options-new/core/options.html +++ b/docs/_includes/options-new/core/options.html @@ -3,7 +3,7 @@ How should Select2 be initialized? -

+

Can default options be set for all dropdowns?

@@ -24,12 +24,7 @@

You can set default options by calling - $.fn.select2.defaults.set("key", "value"). The key that is - set should take the same format as keys set using - HTML data-* attributes which - means that two dashes (--) will be replaced by a level of - nesting, and a single dash (-) will convert it to a camelCase - string. + $.fn.select2.defaults.set("key", "value").

@@ -40,6 +35,15 @@ $.fn.select2.defaults.set("theme", "classic");
     How can I set a default value for a nested option?
   
 
+  

+ The key that is + set should take the same format as keys set using + HTML data-* attributes which + means that two dashes (--) will be replaced by a level of + nesting, and a single dash (-) will convert it to a camelCase + string. +

+

How can I reset all of the global default options?