Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

309
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!