tdesign-react icon indicating copy to clipboard operation
tdesign-react copied to clipboard

fix(Table): improve page scroll handling for affixed header and footer

Open RylanBot opened this issue 2 months ago • 3 comments

🤔 这个 PR 的性质是?

  • [x] 日常 bug 修复
  • [ ] 新特性提交
  • [ ] 文档改进
  • [ ] 演示代码改进
  • [ ] 组件样式/交互改进
  • [ ] CI/CD 改进
  • [ ] 重构
  • [ ] 代码风格优化
  • [ ] 测试用例
  • [ ] 分支合并
  • [ ] 其他

🔗 相关 Issue

  • https://github.com/Tencent/tdesign-react/issues/3894

💡 需求背景和解决方案

📝 更新日志

  • fix(Table): 修复页面滚动时,自定义 container 的吸顶表头或表尾无法与表格对齐的问题

  • [ ] 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项。⚠️

  • [x] 文档已补充或无须补充
  • [x] 代码演示已提供或无须提供
  • [x] TypeScript 定义已补充或无须补充
  • [x] Changelog 已提供或无须提供

RylanBot avatar Oct 18 '25 13:10 RylanBot

tdesign-react-demo

npm i https://pkg.pr.new/tdesign-react@3899

commit: e0eac3d

pkg-pr-new[bot] avatar Oct 18 '25 13:10 pkg-pr-new[bot]

失败

github-actions[bot] avatar Oct 18 '25 13:10 github-actions[bot]

修复前:

renderHeaderContentreaderFooterContentuseMemo 缓存了

https://github.com/user-attachments/assets/15480603-da35-4735-ba92-c0dd5dba7329

修复后:

自定义 container 时垂直滚动依赖 Affix 底层逻辑...目前看来有延迟,有明显运动轨迹,未来需要优化 Affix

https://github.com/user-attachments/assets/0fd5331b-16bf-45a6-8892-ced6423442e3

RylanBot avatar Oct 21 '25 04:10 RylanBot