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

152
Views
Obtener fuente en constructor

Estoy tratando de hacer una búsqueda con autocompletar, dígame cómo puedo obtener en el constructor una matriz de etiquetas y resultados con axios get

 new Autocomplete(input, { source: (response) => { axios.get('{{ route('api.autocomplete) }}', { params: { term: input.value } }) .then(response => { return { label: response.data.name, results: response.data.children, } }) }, select: ({element}) => { alert(element); } }); class Autocomplete { constructor(element, { source = () => {}, select = () => {}, }) { console.log(source); } }

En lugar de una matriz, proporciona un fragmento de código de solicitud de axios

about 4 years ago · Santiago Gelvez
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!