table icon indicating copy to clipboard operation
table copied to clipboard

fix: do not render collapsed row

Open JordanDC2 opened this issue 1 year ago • 5 comments

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

JordanDC2 avatar Apr 17 '23 15:04 JordanDC2

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

vercel[bot] avatar Apr 17 '23 15:04 vercel[bot]

Codecov Report

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

:exclamation: 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%> (ø)

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

codecov[bot] avatar Apr 17 '23 16:04 codecov[bot]

related to https://github.com/react-component/table/pull/715

JordanDC2 avatar Apr 17 '23 18:04 JordanDC2

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?

zombieJ avatar Apr 18 '23 02:04 zombieJ

Ping

yoyo837 avatar Sep 29 '23 01:09 yoyo837