diff --git a/docs/_includes/head.html b/docs/_includes/head.html index c2366908..58a826a2 100644 --- a/docs/_includes/head.html +++ b/docs/_includes/head.html @@ -17,6 +17,7 @@ diff --git a/docs/examples.html b/docs/examples.html index 919e096c..59ca4ad4 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -372,9 +372,9 @@ $(".js-example-tags").select2({
This custom matcher uses a - compatibility module that is only - bundled in the - full version of Select2. You also + compatibility module that is + only bundled in the + full version of Select2. You also have the option of using a more complex matcher.
diff --git a/docs/options.html b/docs/options.html index f63e9bc3..d3cb32a7 100644 --- a/docs/options.html +++ b/docs/options.html @@ -86,6 +86,8 @@ $.fn.select2.amd.require(Placeholder
+ and
+ HidePlaceholder
+placeholder: "Select a repository", ++
If the value is an object, the object should be
compatible with Select2's internal objects. The id
should
@@ -116,13 +122,78 @@ $.fn.select2.amd.require(
when that option is selected.
+placeholder: { + id: "-1", + text: "Select a repository" +} ++
value
attribute on the option
.
+ You can allow a selected option to be cleared back to the placeholder by
+ enabling the allowClear
option.
+
allowClear
SelectionAdapter
+ AllowClear
+ + This will display an "x" that the user can click to clear the current + selection. It is designed to be used for cases where a single selection + can be made. +
+ ++ Select2 can display either a single selection or multiple selections. +
+ +multiple
true
or false
)SelectAdapter
(used by
+ default) should use to set the value of the underlying select
+ element. It will also determine if the MultipleSelection
+ adapter should be used.
+
+ Select2 allows you to change the way that the dropdown works, allowing you + to do anything from attach it to a different location in the document or + add a search box. +
+ ++ By default, Select2 will attach the dropdown to the end of the body and + will absolutely position it to appear below the selection container. +
+ +dropdownParent
DropdownAdapter
+ AttachBody
+ + When the dropdown is attached to the body, you are not limited to just + displaying the dropdown below the container. Select2 will display above + the container if there is not enough space below the container, but there + is enough space above it. You are also not limited to displaying the + drodown within the parent container, which means Select2 will render + correctly inside of modals and other small containers. +
+ ++ Select2 can place the dropdown directly after the selection cotainer, so + it will appear in the same location within the DOM as the rest of Select2. +
+ +DropdownAdapter
+ AttachContainer
+ + Users can filter down the results by typing a search term into a box that + is displayed at the top of the dropdown. +
+ +DropdownAdapter
+ DropdownSearch
+ + A search box is added to the top of the dropdown automatically for select + boxes where only a single option can be selected. +
+