Skip to content

Commit d306fcf

Browse files
committed
Added default selection for AJAX
1 parent 5535f07 commit d306fcf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

docs/examples.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ <h1>Loading remote data</h1>
170170
</p>
171171

172172
<p>
173-
<select class="js-example-data-ajax form-control"></select>
173+
<select class="js-example-data-ajax form-control">
174+
<option value="ivaynberg/select2" selected="selected">ivaynberg/select2</option>
175+
</select>
174176
</p>
175177

176178
<pre data-fill-from=".js-code-data-ajax"></pre>
@@ -543,7 +545,7 @@ <h2>Example code</h2>
543545
return markup;
544546
},
545547
templateSelection: function (repo) {
546-
return repo.full_name;
548+
return repo.full_name || repo.text;
547549
}
548550
});
549551

0 commit comments

Comments
 (0)