1
0
mirror of synced 2025-02-04 06:09:23 +03:00

documentation tweaks

This commit is contained in:
Igor Vaynberg 2012-07-14 23:40:11 +03:00
parent 67a4069279
commit cd64a2051b
2 changed files with 5 additions and 14 deletions

View File

@ -843,25 +843,16 @@ $("#e18,#e18_2").select2();
<p class="alert alert-info">Only applies to single-value select boxes</p> <p class="alert alert-info">Only applies to single-value select boxes</p>
</td> </td>
</tr> </tr>
<tr><td>placeholder</td><td>object/string</td><td> <tr><td>placeholder</td><td>string</td><td>
<p>Initial value that is selected if no other selection is made.</p> <p>Initial value that is selected if no other selection is made.</p>
<p>
The value can be specified either as an <code>object</code> or as a <code>string</code>. If
specified as a <code>string</code> any custom <code>formatSelection</code> function will be
bypassed and the string value will be rendered directly.
</p>
<p>The placeholder can also be specified as a <code>data-placeholder</code> attribute on the <code>select</code> <p>The placeholder can also be specified as a <code>data-placeholder</code> attribute on the <code>select</code>
or <code>input</code> element that Select2 is attached to. In this case only <code>string</code> or <code>input</code> element that Select2 is attached to.
values are supported
</p> </p>
<p class="alert alert-warning">Note that because browsers assume the first <code>option</code> element <p class="alert alert-warning">Note that because browsers assume the first <code>option</code> element
is selected in is selected in non-multi-value select boxes an empty first <code>option</code> element must be provided (<code>&lt;option&gt;&lt;/option&gt;</code>)
non-multi-value select boxes an empty first <code>option</code> element must be provided (<code>&lt;option&gt;&lt;/option&gt;</code>)
for the placeholder to work. for the placeholder to work.
</p> </p>
<p class="alert alert-warning">When Select2 is used in multi-select mode the placeholder must be a string.</p>
</td></tr> </td></tr>
<tr> <tr>
<td>allowClear</td> <td>allowClear</td>
@ -938,7 +929,7 @@ $("#e18,#e18_2").select2();
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<tr><th>Parameter</th><th>Type</th><th>Description</th></tr> <tr><th>Parameter</th><th>Type</th><th>Description</th></tr>
<tr><td>object</td><td>object</td><td>The selected result object returned from the <code>query</code> function</td></tr> <tr><td>object</td><td>object</td><td>The selected result object returned from the <code>query</code> function</td></tr>
<tr><td>&lt;returns&gt;</td><td>string</td><td>Html that represents the selection</td></tr> <tr><td>&lt;returns&gt;</td><td>string</td><td>Html string, a DOM element, or a jQuery object that renders the selection</td></tr>
</table> </table>
The default implementation expects the object to have a <code>text</code> property that is returned. The default implementation expects the object to have a <code>text</code> property that is returned.
<br><br> <br><br>

@ -1 +1 @@
Subproject commit 5a73385474a6fe9878a15ee3e4a91ca3b39c0c24 Subproject commit 6f973d6e406a27ed9bd62d5968113bca56e1e519