Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

275
Vistas
SVG element in list, when I hide the first parent, all of next SVG in each section will be hidden too, but not the container

I face a strange bug with Next. With getServerSideProps, I made a request to my api folder, this result a simple JSON. All is good.

I display the content perfectly, no problem.

I put on the parent element a onClick attribute, who call a function of my main file No problem, all is good too.

But, in this function, I ask to hide the children of the global element. It works, but, when it's the first occurence of the list, all others SVG in the list get hidden too, but in fact, in CSS, nothing appears.

Do you know why ?

I post with this a Vercel link, GitHub repo, and screens.

I solved this, by changing the SVG element, with a <Image/> element... But it's not clean...

Vercel Link : Vercel

GitHub Repo : GitHub

Screen 1
Initial

Screen 2
Click on first element

Screen 3
Click on second element

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

A quick fix, but isn't clean for me... Replace svg component by ... And it's work. Maybe a bug with id on SVG elements.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda