Permalink
Browse files

Fix : MultiSelect no updating when original change

MultiSelect Dropdown.js no updating when original multiselect change.
1 parent a22ee6f commit 0aee6dc0264578949d290260e38bd31fe3d332d4 @SullyP SullyP committed on GitHub Dec 29, 2016
Showing with 8 additions and 1 deletion.
  1. +8 −1 jquery.dropdown.js
View
@@ -210,7 +210,14 @@
}
methods._select($dropdown, $selected);
} else {
- // methods._select($dropdown, $select.find(":selected"));
+ var target = $select.find(":selected");
+ // Unselect all options
+ selectOptions.removeClass("selected");
+ // Select options
+ target.each(function () {
+ var selected = selectOptions.filter("[value=\"" + $(this).attr("value") + "\"]");
+ selected.addClass("selected");
+ });
}
});

0 comments on commit 0aee6dc

Please sign in to comment.