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

310
Visualizações
How to insert a button in a react table?

I'm trying to insert a button in a react table so that the UI will be like so: Ideal UI However, since I construct the table using the format of "tableHead" & "tableData" as shown below, seems like it is not permissible for me to add a button in the tableData array. May I ask how should I add the button in the place as highlighted in the picture? Much appreciated.

             <CardBody>
              <Table
                tableHeaderColor="warning"
                tableHead={[
                  "Name",
                  "Market Value",
                  "Total Holding Value",
                  "Face Value",
                  "Maturity Date",
                  "Total Interest Received",
                  "Action",
                ]}
                tableData={[
                  [
                    "PBS17",
                    "Rp 93,000",
                    "Rp 9,300,000",
                    "Rp 1,000,000",
                    "30/6/2027",
                    "Rp 525,000",
                    "Button"
                  ],
                ]}
              />
            </CardBody>
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

You can insert button where you are defining columns for table like below:

{
      width: 300,
      Header: "Button",
      Cell: ({ cell }) => (
        <button value={cell.row.values.name} onClick={props.handleClick}>
          Button
        </button>
      )
    }
about 4 years ago · Juan Pablo Isaza Relatório

0

I think u can pass button as component in tableData

 <CardBody>
              <Table
                tableHeaderColor="warning"
                tableHead={[
                  "Name",
                  "Market Value",
                  "Total Holding Value",
                  "Face Value",
                  "Maturity Date",
                  "Total Interest Received",
                  "Action",
                ]}
                tableData={[
                  [
                    "PBS17",
                    "Rp 93,000",
                    "Rp 9,300,000",
                    "Rp 1,000,000",
                    "30/6/2027",
                    "Rp 525,000",
                    <button></button>
                  ],
                ]}
              />
            </CardBody>
about 4 years ago · Juan Pablo Isaza Relatório
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