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

144
Views
Onchange Event, ¿mi valor de filtro se vacía en la Lista?

¿Actualicé mi matriz original para convertirla en una plantilla reactiva para la lista de matrices de mis estudiantes con la selección de nombre en JS? cuando selecciono el botón por primera vez, aparece el valor correcto del filtro, pero si hago clic en el segundo botón iterativo, muestra []. ¿Qué pasa con mi código?

 handlechange(event) { const value = event.target.value; this.students = this.students.filter(e=>e.name.startsWith(value)); } <table className="table table-bordered"> <tr> <th>ID</th> <th>Name</th> <th>Email</th> </tr> {students.map((student, index) => ( <tr data-index={index}> <td>{student.id}</td> <td>{student.name}</td> <td>{student.email}</td> </tr> ))} <button onclick={this.handlechange(student.name)}>click </button> </table>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use otra matriz para almacenar (y mostrar) sus resultados. No modifique su fuente.

 handlechange(event) { const value = event.target.value; this.filteredStudents = this.students.filter(e=>e.name.startsWith(value)); }
about 4 years ago · Juan Pablo Isaza Report
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!