New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: better approach to solve not show overflow content when in elastic #20821
Conversation
Deploy preview for ant-design ready! Built with commit 3ec3f99 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 3ec3f99:
|
Codecov Report
@@ Coverage Diff @@
## 3.x-stable #20821 +/- ##
===========================================
Coverage 97.81% 97.81%
===========================================
Files 286 286
Lines 7749 7749
Branches 2172 2172
===========================================
Hits 7580 7580
Misses 169 169 Continue to review full report at Codecov.
|
@afc163 我知道这个,但是因为我们实际产品中用户能够自定义每一列的宽度,所以每列都需要有一个宽度,当宽度不够的时候就会出现这个裂缝 |
这个没办法,宽度都写死了碰到弹性布局必然会出现裂缝,你代码里要有计算宽度保证 100% 填满的代码(用户全设置宽度也预留一列,或是按比例计算百分比)。 这个代码思路很不错,但是不解决根本问题(比如单元格里面有自定义组件或者复杂内容)。 |
OK,谢谢你的建议。btw麻烦请教下不解决根本问题是指单元格下面元素color或者visibility的css权重比antd高的时候还是有问题,还说其他情况呢? |
就是单元格里不是文本节点依然有空白。 不过你这个也算是一个没负作用的小优化,我合掉了。 |
固定列本来用来覆盖原来的列, 宽度和不够的时候, 列的宽度被拉伸导致用来覆盖的区域宽度不够,感觉上这改动,如果需要加外边框(bordered | 是否展示外边框和列边框), 还是有问题, |
啥时候能出一个屏幕宽度能放的下的时候不固定列, 放不的时候固定列的表格, 感觉理论上是能实现的。 |
也希望能出一个加载大量数据的表格, 比如100000条数据的表格。 |
4.0 表格已经支持virtualScroll. |
期待 |
🤔 This is a ...
🔗 Related issue link
使用现在的方式解决固定列问题会导致直接留白:https://codesandbox.io/s/cranky-sun-9p1fx
💡 Background and solution
如果单元格内有直接的NodeText,使用
color: transparent
处理,如果单元格内有其他元素,使其隐藏。If the cell's child is direct NodeText, use
color: transparent
, if the cell includes other elements, usevisibility: hidden
📝 Changelog
☑️ Self Check before Merge