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

311
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 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