From c08295fc3c6cdf5900315a1e9d91dfa7d95d8603 Mon Sep 17 00:00:00 2001 From: UltCombo Date: Mon, 20 Jan 2014 00:30:42 -0200 Subject: [PATCH] Document disabled options; update query options.callback's result.results; closes #1626 (2) --- index.html | 37 ++++++++++++++++++++++++++++++++++++- select2-latest.html | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 9619af90..c7f75ef2 100644 --- a/index.html +++ b/index.html @@ -970,6 +970,41 @@ $("#e18,#e18_2").select2(); +
+ +
+

Disabled options

+

+ In case that you need to disable certain options so that they can't be selected by the select2 interface, you can now pass in disabled: true with your data. Please note: This also works for incoming values from ajax. When attached to a <select> element, Select2 will respect its <option> elements' disabled property. +

+

+ +

+
+
+

Example Code

+
+              
+
+
+
+
+

Disabled options

+

+ In case that you need to disable certain options so that they can't be selected by the select2 interface, you can now pass in disabled: true with your data. Please note: This also works for incoming values from ajax. When attached to a <select> element, Select2 will respect its <option> elements' disabled property. +

+

+ +

+
+
+

Example Code

+
+              
+
+
+