Commit bdd8a427 authored by David Stutz's avatar David Stutz

Merge pull request #345 from nnieslan/master

Knockout.js Binding: Fixing the initialization of the selected items in the multi-select
parents 5f22e189 1782cb98
......@@ -30,6 +30,8 @@
$(element).multiselect(config);
if (isObservableArray(listOfSelectedItems)) {
//set the initial selection state on the multi-select list
$(element).multiselect('select', ko.utils.unwrapObservable(listOfSelectedItems));
// Subscribe to the selectedOptions: ko.observableArray
listOfSelectedItems.subscribe(function (changes) {
var addedArray = [], deletedArray = [];
......
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