react-component / react-component/table
Why do collapsed rows remain in the DOM?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 618
- Avg merge
- 10h 19m
- Merged PRs (30d)
- 2
Description
Collapsed rows (in nested tables) remain in the DOM, but with style={display:none;}. This creates a nasty issue if someone is trying to stripe their table with even-odd CSS rules (which is very common).
Eg. https://table-react-component.vercel.app/demo/expanded-row-render
It seems like the fix would be to add the following to ExpandedRow:
if (!expanded) {
return null;
}
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 locating the ExpandedRow component and reproduce the behavior in the expanded-row-render demo. Check how collapsed nested rows are rendered and verify that they are absent from the DOM when collapsed. Confirm that table striping with even-odd CSS rules works correctly afterward.
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
- Mostly clear
- Newbie friendliness
- 35/100