Added default selection for AJAX
This commit is contained in:
parent
5535f072e1
commit
d306fcf82c
@ -170,7 +170,9 @@ $(".js-example-data-array-selected").select2({
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<select class="js-example-data-ajax form-control"></select>
|
||||
<select class="js-example-data-ajax form-control">
|
||||
<option value="ivaynberg/select2" selected="selected">ivaynberg/select2</option>
|
||||
</select>
|
||||
</p>
|
||||
|
||||
<pre data-fill-from=".js-code-data-ajax"></pre>
|
||||
@ -543,7 +545,7 @@ $.fn.select2.amd.require(
|
||||
return markup;
|
||||
},
|
||||
templateSelection: function (repo) {
|
||||
return repo.full_name;
|
||||
return repo.full_name || repo.text;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user