table icon indicating copy to clipboard operation
table copied to clipboard

feat: support column.resizable

Open linxianxi opened this issue 1 year ago • 48 comments

  • RFC: https://github.com/ant-design/ant-design/discussions/48152
  • issue https://github.com/ant-design/ant-design/issues/32811

原先内部 onColumnResize 重命名为 onColumnWidthChange,进行区分

Summary by CodeRabbit

  • 新功能

    • 表格列支持可调整宽度(resizable),表头可拖拽调整,支持最小宽度与方向适配;新增列宽调整完成回调以获取被调整列及所有列的最新宽度,调整状态在表格上有视觉指示。
    • 示例改为基于 Hooks 的演示,包含 RTL 切换与内置列调整演示。
  • 样式

    • 增加拖拽手柄与调整指示线样式,优化固定列阴影的交互体验(阻止遮挡交互)。
  • 文档

    • 更新 README,新增 resizable 属性说明。
  • 测试

    • 添加列宽调整行为测试,覆盖宽度变化、最小宽度约束与回调验证。
  • 其它

    • 移除外部列调整依赖,示例和实现采用内置方案。

✏️ Tip: You can customize this high-level summary in your review settings.

linxianxi avatar Apr 08 '24 08:04 linxianxi

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 Jun 26, 2024 5:33am

vercel[bot] avatar Apr 08 '24 08:04 vercel[bot]

体验有点怪异,如果是超出 width 的时候缩小应该就是缩小,不应该把右边的撑开才对。

zombieJ avatar Apr 23 '24 07:04 zombieJ

看起来好像没对齐

截屏2024-05-10 13 56 36

zombieJ avatar May 10 '24 05:05 zombieJ

看起来好像没对齐

截屏2024-05-10 13 56 36

故意放在最右侧左边的,没有放在最右侧中间。因为可能会因为 ellipsis 设置造成 超出部分不显示

linxianxi avatar May 10 '24 06:05 linxianxi

Codecov Report

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

Project coverage is 98.06%. Comparing base (facc838) to head (875626c). Report is 6 commits behind head on master.

:exclamation: Current head 875626c differs from pull request most recent head 696ddd4

Please upload reports for the commit 696ddd4 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1106      +/-   ##
==========================================
+ Coverage   97.96%   98.06%   +0.09%     
==========================================
  Files          51       53       +2     
  Lines        4674     4913     +239     
  Branches      597      627      +30     
==========================================
+ Hits         4579     4818     +239     
  Misses         91       91              
  Partials        4        4              

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

codecov[bot] avatar May 11 '24 05:05 codecov[bot]

mark

li-jia-nan avatar Sep 06 '24 05:09 li-jia-nan

mark 2

yoyo837 avatar Sep 06 '24 06:09 yoyo837