I'm having issues witht the select2
$('#charity_user_id').select2({
ajax: {
url: "/get-users",
dataType: 'get',
delay: 250,
data: function (params) {
return {
q: params.term, // search term
page: params.page
};
},
processResults: function (data) {
return {
results: data
};
},
cache: true
},
minimumInputLength: 4,
});
My ajax call result is something like this:
[{id: 24941, text: "mail@mail.com"}]
Why is select2 not showing the results? It just says "The results could not be loaded"