table icon indicating copy to clipboard operation
table copied to clipboard

expandedRowRender and colspan

Open harikt opened this issue 1 year ago • 0 comments

Hi,

I am rendering a table, which has an expandedRowRender: (record) => <ExpandedLazyLoadedRow record={record} />, function to render a component once data is fetched from the api.

Currently the table renders like

image

What I am trying to do is render the td instead of this

<tr class="rc-table-expanded-row rc-table-expanded-row-level-1">
  <td class="rc-table-cell" colspan="6">
      <div style="display: flex;">
        <div style="flex: 1 1 0%; padding-right: 8px;">Expanded Content 1 (colspan 2)</div>
        <div style="flex: 3 1 0%;">Expanded Content 2 (colspan 4)</div>
      </div>
  </td>
</tr>

to

<tr class="rc-table-expanded-row rc-table-expanded-row-level-1">
  <td class="rc-table-cell" colspan="2">
      Some content
  </td>
  <td class="rc-table-cell" colspan="4">
      Some content
  </td>
</tr>

So that it aligns correctly with the parent column. Any inputs is really appreciated.

Thank you.

harikt avatar Jul 26 '24 17:07 harikt