Fix issue with multiselect BT#17105

https://github.com/crlcu/multiselect/issues/193
pull/3213/head
Julio Montoya 6 years ago
parent c7f8206552
commit b5481d8e12
  1. 18
      app/Resources/public/assets/multiselect-two-sides/dist/js/multiselect.js

@ -779,18 +779,14 @@ if (typeof jQuery === 'undefined') {
// sort options then reappend them to the select
$.fn.mSort = function(callback) {
this
var children = this
.children()
.sort(callback)
.appendTo(this);
this
.find('optgroup')
.each(function(i, group) {
$(group).children()
.sort(callback)
.appendTo(group);
})
.sort(callback);
for ( var j = 0; j < this.length; j++ ) {
for ( var i = 0; i < children.length; i++ ) {
this[j].appendChild(children[i]);
}
}
return this;
};

Loading…
Cancel
Save