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

206
Views
¿Cómo eliminaría la fila desplegable seleccionada actualmente en reactJS?

Tengo una fila de selección donde se agregan datos cuando se ingresa una entrada.

 <Input type="select" name="selectProf" id="selectProf"> <option>-</option> { thanks.map((t,i) => <option key={i}>{t}</option> ) } </Input>

Pero cuando se selecciona la opción específica, me gustaría que elimine la fila específica en lugar de todos los datos en la selección.

Mi código anterior era este:

 function handleDelete(){ localStorage.setItem('profileID', '[]') }

Pero esto borró la matriz y, como resultado, eliminó todo en la selección. Intenté esto:

 function handleDelete(){ if (JSON.parse(localStorage.getItem('profileID')) === document.getElementById('selectProf').value){ //code here } }

Sin embargo, este método no funcionó porque es incorrecto. ¿Cómo haría para eliminar la fila de selección específica?

about 4 years ago · Juan Pablo Isaza
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!