How to pass selected value in the ant design nested table in row selection

22 views Asked by At

The ant design table has been nested with a table employing expandable props. Data from the source is passed along with the child data. Row selection includes both the parent and child tables. I can't fit the specified keys into both tables. Then I want to include those specified values in the API request. How will I resolve this?

I attempted to fit the selected row onto both the parent and child tables. It is work at the parent table, but not for the youngsters. I simply want to give the value to API Request.

I want to pass the payload as like

[
  {
    "label": "Dashboard", // parent table
    "task": [ // child table detail
      { "label": "Sample One" },
      { "label": Sample Six" }
    ]
  },
  {
    "label": "Profile",
    "task": [
      { "label": "Sample One" },
      { "label": "Sample Two" }
    ]
  },
  {
    "label": "Ticket",
    "task": [
      { "label": "Sample Five" },
      { "label": "Sample Six" }
    ]
  }
]
0

There are 0 answers