i want to add the result of api to my multiple select but the problem is it doesnt go to success or result callback (no log in results callback) what is the problem? select2 version is <4
$('#e1').select2({
ajax: {
dataType: "json",
url: "http://192.168.1.5:8585/test.json",
// data: function (data) {
// console.log("data");
// console.log(data);
// },
results: function (data) {
console.log(data);
return {
results: data.data
};
}
},
multiple:true
});
HTML:
<input type="text" id="e1"/>