Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

215
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda