Commit f6910e40 authored by David Stutz's avatar David Stutz

Follow up on #666.

parent 5eea80cd
......@@ -5374,43 +5374,16 @@ optionLabel: function(element){
<dt>How to bind object values using Knockout JS?</dt>
<dd>
This issue was discussed in <a href="https://github.com/davidstutz/bootstrap-multiselect/issues/532">#532</a>.
<br>
<br>
<p>
bootstrap-multiselect depends upon the following standard knockout bindings:
<br>
<code>options, value, selectedOptions, enable, disable</code>
<br><br>
When these options change, they will update the internal <code>&lt;select&gt;</code> box and then the jQuery multiselect plugin triggers a refresh.
</p>
<ul>
<li><h4>options</h4></li>
<p>This issue was discussed in <a href="https://github.com/davidstutz/bootstrap-multiselect/issues/532">#532</a>.</p>
<p>The plugin depends upon the following standard knockout bindings: <code>options</code>, <code>value</code>, <code>selectedOptions</code>, <code>enable</code>, <code>disable</code>. When these options change, they will update the internal <code>select</code> element and <code>.multiselect('refresh')</code> is triggered.
<ul>
<li>When options is an observable and changes, your <code>&lt;select&gt;</code> options will be recalculated by knockout, then bootstrap-multiselect will refresh.</li>
<li><code>options</code>: when <code>options</code> is an observable and changes, the <code>option</code>'s inside the <code>select</code> are updated by knockout and the plugin refreshes.</li>
<li><code>value</code>: can only be used in single selection mode; Knockout does not support using the value binding handler to update a <code>select</code> with <code>multiple=&quotmultiple&quot;</code>.</li>
<li><code>selectedOptions</code>: this is a standard knockout binding that updates the checked options inside the <code>select</code> element; use with <code>multiple=&quotmultiple&quot;</code>.</li>
<li><code>enable</code>: enable the plugin.</li>
<li><code>disable</code>: disable the plugin.</li>
</ul>
<li><h4>value</h4></li>
<ul>
<li>Only use this when you are using the radio button feature of bootstrap-multiselect. Knockout doesn't support using the value binding handler to update <code>&ltselect multiple="multiple"&gt;</code></li>
</ul>
<li><h4>selectedOptions</h4></li>
<ul>
<li>This is a standard knockout binding that updates the checked options inside a select element. Use this when trying to update a multiple type select box.</li>
</ul>
<li><h4>enable</h4></li>
<ul>
<li>Use it to enable the bootstrap dropdown.</li>
</ul>
<li><h4>disable</h4></li>
<ul>
<li>Use it to enable the bootstrap dropdown.</li>
</ul>
</ul>
<br>
<p>
Any other options inside the multiselect data bind are passed to the jQuery multiselect plugin.
</p>
<br>
<p>Any other options inside the multiselect data bind are passed to the jQuery multiselect plugin.</p>
</dd>
<dt>Options do net get updated when using Angular JS?</dt>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment