react-component / react-component/table

ExpandableRow does not use overridden cell component

Open
#318 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.4k
Forks
618
Avg merge
10h 19m
Merged PRs (30d)
2

Description

I wanted to override table components with components prop, but if a table has a cell with expand icon, its cell is still rendered as <td> element:

https://github.com/react-component/table/blob/cecc6476373568d8ffe0708f62f8d9e87be8533c/src/ExpandableRow.js#L93

Here you can see other cells use the components given in props:

https://github.com/react-component/table/blob/3551670d0da98cf2314cf1cfdf49a2cdd56be3c1/src/TableRow.js#L220

screenshot-2019-04-14T14-43-28

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/ExpandableRow.js around line 93 and compare the cell rendering with src/TableRow.js around line 220. Reproduce a table using the components prop with an expandable cell, then verify that the custom cell component is used for the expand-icon cell instead of a td element.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.