Hey everybody,
I have a problem with data loaded via ajax:
selImages.select2({
tags: true,
multiple: true,
tokenSeparators: [',', ' '],
minimumInputLength: 2,
maximumSelectionLength: 8,
ajax: {
url: URL,
dataType: 'json',
type: 'GET',
data: function (params) {
var queryParameters = {
searchTerm: params.term,
productID: ".json_encode($pInfo->products_id) . "
}
return queryParameters;
},
processResults: function(json, params) {
var results = [];
$.each(json, function(k, v) {
results.push({
id: v.id,
text: v.text,
path: v.path
});
});
return {
results: results
};
}
}
}).maximizeSelect2Height();
On first select everything works fine.
The second select gives me the following:
Any idea, why the not selected items get a
aria-selected="true"
Thanks in advance.
Regards