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

216
Vistas
Open an element under a button when the button is clicked in React

Having this design:

enter image description here

There is a table with some rows, when a row is clicked, that kebab button (3 vertical dots) is visible.

When the button is clicked it should open an element which has some data in it - in this case a list of actions.

The part with showing the kebab button is working:

{
  id: 'my-button',
  Cell: ({ cell }: CellProps<MyCell>) => {
    if (cell.row.index === selectedIndex) {
      return (
        <div>
          <Button
            icon={<ThreeDots />}
            onClick={toggleModal}
          />
        </div>
      );
    }
    return <div></div>;
  }
}

when the row is clicked, the 3-dots button is visible. There is also a boolean which is initially set to false but toggles its value when the button is clicked (toggleModal).

But how can that element with the list added under the button?

Done something like:

{isModalOpened ? <div className='absolute'>test</div> : null}

Or maybe is there any online solution to fix this?

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