Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

241
Views
Select2 Ajax won't show the results

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"

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!