diff --git a/select2-latest.html b/select2-latest.html index 482ce2fe..7f41fbba 100644 --- a/select2-latest.html +++ b/select2-latest.html @@ -186,6 +186,11 @@ $("#e10_3").select2({ formatSelection: format, formatResult: format }); +$("#e10_4").select2({ + data:function() { return { results: data }; }, + formatSelection: format, + formatResult: format +}); }); @@ -521,6 +526,11 @@ $("#e19").select2({ maximumSelectionSize: 3 });
+
data
can also itself be a function that returns a results object:
+ +
+