Commit 28e504fe authored by Nithyaduruvan's avatar Nithyaduruvan

deselectAll should do so in singleselect as well

Changing the value of a single select dropdown using 'select' method does not clear the previous values because, deselectAll method won't deselect radio button's selections. It handled only checkboxes. So removed the checkbox specific filter in jquery selector.
parent 6367ced0
...@@ -1131,7 +1131,7 @@ ...@@ -1131,7 +1131,7 @@
var justVisible = typeof justVisible === 'undefined' ? true : justVisible; var justVisible = typeof justVisible === 'undefined' ? true : justVisible;
if(justVisible) { if(justVisible) {
var visibleCheckboxes = $("li input[type='checkbox']:not(:disabled)", this.$ul).filter(":visible"); var visibleCheckboxes = $("li input:not(:disabled)", this.$ul).filter(":visible");
visibleCheckboxes.prop('checked', false); visibleCheckboxes.prop('checked', false);
var values = visibleCheckboxes.map(function() { var values = visibleCheckboxes.map(function() {
...@@ -1147,7 +1147,7 @@ ...@@ -1147,7 +1147,7 @@
} }
} }
else { else {
$("li input[type='checkbox']:enabled", this.$ul).prop('checked', false); $("li input:enabled", this.$ul).prop('checked', false);
$("option:enabled", this.$select).prop('selected', false); $("option:enabled", this.$select).prop('selected', false);
if (this.options.selectedClass) { if (this.options.selectedClass) {
......
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