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

204
Views
Cuando llego al último elemento del carrusel de reacción, se necesitan dos clics para volver al primer elemento.

Entonces, cuando estoy en el último elemento y hago clic en siguiente, se moverá al siguiente elemento, pero no moverá la barra de desplazamiento al principio, a menos que vuelva a presionar siguiente, pero el índice ahora está en el segundo elemento, no en el primero.

 const nextSlide = () => { if (current === length - 1) { setCurrent(0); listRef.current.scrollIntoView({ behaviour: "smooth", block: "nearest", inline: "center", }); } else { setCurrent(current + 1); listRef.current.scrollIntoView({ behaviour: "smooth", block: "nearest", inline: "center", }); } };

aquí está la caja de códigos: https://codesandbox.io/s/boring-sea-bfds7?file=/src/App.js

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!