Skip to content

Conversation

shaodahong
Copy link
Member

@shaodahong shaodahong commented Sep 29, 2020

@vercel
Copy link

vercel bot commented Sep 29, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/table/itvc9sijp
✅ Preview: https://table-git-sticky-getcontainer.react-component.vercel.app

@codecov
Copy link

codecov bot commented Sep 29, 2020

Codecov Report

Merging #537 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #537   +/-   ##
=======================================
  Coverage   99.87%   99.87%           
=======================================
  Files          26       26           
  Lines         787      791    +4     
  Branches      224      229    +5     
=======================================
+ Hits          786      790    +4     
  Misses          1        1           
Impacted Files Coverage Δ
src/Table.tsx 100.00% <100.00%> (ø)
src/hooks/useSticky.ts 100.00% <100.00%> (ø)
src/stickyScrollBar.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc3681d...f471628. Read the comment docs.

@zombieJ
Copy link
Member

zombieJ commented Sep 29, 2020

对用户而言有点复杂了,感觉应该是让 Table 内部处理掉这个逻辑。是不是可以把滚动条改成 sticky,然后添加 window 一些相关的 scroll 事件让它固定住?

@shaodahong
Copy link
Member Author

对用户而言有点复杂了,感觉应该是让 Table 内部处理掉这个逻辑。是不是可以把滚动条改成 sticky,然后添加 window 一些相关的 scroll 事件让它固定住?

现在就是这样做的,滚动条 fixed 变成 sticky 了,这个改动用户无感,只是为了兼容 Modal 里面有 table 这种情况,有个痛点就是 sticky 挑容器

@zombieJ zombieJ merged commit 6170081 into master Sep 30, 2020
@zombieJ zombieJ deleted the sticky-getcontainer branch September 30, 2020 08:49
@zombieJ
Copy link
Member

zombieJ commented Sep 30, 2020

+ rc-table@7.10.0

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.

sticky scrollbar 在包含表格的可滚动元素不是 body 的时候不生效

2 participants