react-component / virtual-list

🧾 React Virtual List Component which worked with animation
https://rc-virtual-list.react-component.now.sh
MIT License
725 stars 154 forks source link

fix: modify scroll bar size #252

Closed linxianxi closed 8 months ago

linxianxi commented 9 months ago

1、使滚动条的长度与真实的滚动条长度差不多,原来的计算方式不对

这里滚动体宽度太短了,与非 virtual 模式下差距太大 image

2、scrollWidth > size.width 时才显示 horizontal 滚动条,所以内部 canScroll 没用了

vercel[bot] commented 9 months ago

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

Name Status Preview Comments Updated (UTC)
virtual-list ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 1, 2024 9:19am
codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2d4aef8) 98.24% compared to head (909e8c1) 98.23%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #252 +/- ## ========================================== - Coverage 98.24% 98.23% -0.01% ========================================== Files 18 18 Lines 683 681 -2 Branches 160 160 ========================================== - Hits 671 669 -2 Misses 12 12 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.