react-component / react-component/table
expandedRowRender and colspan
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 618
- Avg merge
- 10h 19m
- Merged PRs (30d)
- 2
Description
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
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing expandedRowRender through the expanded-row rendering path and checking how the current colspan is assigned. Confirm whether the existing API can produce multiple cells aligned with parent columns; done means expanded content renders in separate cells with the requested colspans and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100