summaryrefslogtreecommitdiffstats
path: root/multiple-select.js
diff options
context:
space:
mode:
Diffstat (limited to 'multiple-select.js')
-rw-r--r--multiple-select.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/multiple-select.js b/multiple-select.js
index 25cb16a..d811b28 100644
--- a/multiple-select.js
+++ b/multiple-select.js
@@ -480,11 +480,13 @@
setSelects: function (values) {
var that = this;
this.$selectItems.prop('checked', false);
+ this.$disableItems.prop('checked', false);
$.each(values, function (i, value) {
that.$selectItems.filter(sprintf('[value="%s"]', value)).prop('checked', true);
+ that.$disableItems.filter(sprintf('[value="%s"]', value)).prop('checked', true);
});
this.$selectAll.prop('checked', this.$selectItems.length ===
- this.$selectItems.filter(':checked').length);
+ this.$selectItems.filter(':checked').length + this.$disableItems.filter(':checked').length);
$.each(that.$selectGroups, function (i, val) {
var group = $(val).parent().attr('data-group'),