Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not render collapsed row #979

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JordanDC2
Copy link
Contributor

@JordanDC2 JordanDC2 commented Apr 17, 2023

This fixes the case where you expand a table row which adds an element to the DOM, but previously would not be removed from the DOM when collapsing the row again.

This fix is useful for implementing zebra striping on a table with expandable rows, as without this fix, expanding a row and then collapsing it adds an invisible row which messes up striping.

close #714
close #715

@vercel
Copy link

vercel bot commented Apr 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
table ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2023 4:26pm

@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Merging #979 (6e70327) into master (a9490ca) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 6e70327 differs from pull request most recent head 722d6b5. Consider uploading reports for the commit 722d6b5 to get more accurate results

@@           Coverage Diff           @@
##           master     #979   +/-   ##
=======================================
  Coverage   99.49%   99.49%           
=======================================
  Files          36       36           
  Lines         989      990    +1     
  Branches      305      320   +15     
=======================================
+ Hits          984      985    +1     
  Misses          5        5           
Impacted Files Coverage Δ
src/Body/ExpandedRow.tsx 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@JordanDC2
Copy link
Contributor Author

related to #715

@zombieJ
Copy link
Member

zombieJ commented Apr 18, 2023

Render using style is by design to avoid expanded row unmount & mount. Developer may add some effect like ajax on expanded render. Could you help to check if components prop can help on this or need some extends?

@yoyo837
Copy link
Member

yoyo837 commented Sep 29, 2023

Ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why do collapsed rows remain in the DOM?
3 participants