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

114
Vistas
How to display overflowing items as a dropdown while mapping a list of items in react js

I have a react app & I'm dividing my screen into two as shown below.

 <div className="App">
      <div className="left">
        {items.map((item) => (
          <h4>{item}</h4>
        ))}
      </div>
      <div className="right">
        {products.map((product) => (
          <span>{product}</span>
        ))}
      </div>
    </div>

In the left side Im displaying a list of h4 tags while mapping through a list and displaying it as row. On the right side I'm displaying a list of products as column.

The styling is below

.App {
  height: 100%;
  width: 100%;
  background-color: aquamarine;
  display: flex;
}

.left {
  width: 50%;
  background-color: red;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}
.left h4 {
  padding-right: 1rem;
}

.right {
  width: 50%;
  display: flex;
  flex-direction: column;
}

Currently, the item list is overflowing and what I want is to display the overflowing items as a dropdownlist when we hover over to the end of the left div

Is there a way to do that?

The codesandbox is below

https://codesandbox.io/s/fervent-raman-0rywqt?file=/src/styles.css:0-304

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