multiselect
multiselect copied to clipboard
Initial sorting of selected items
It would be good to be able to order the initially loaded selected items as they are ordered in the html rather than by alphabetical order.
I now see this is possible using nodeComparator
How you come with that? I still cannot make auto-sorting for selected items. I tried a code example from documentation but without luck :(
var ka = node1.data('multiselect.optionLink').val(),
kb = node2.data('multiselect.optionLink').val();
return ka == kb ? 0 : (ka < kb ? -1 : 1);