Skip to content
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

为什么Table的冻结表头无法完成列宽自动同步,在下方未出现滚动条时,表头为什么右侧会有难看的滚动条。 #3312

Closed
git102347501 opened this issue Apr 19, 2019 · 4 comments

Comments

@git102347501
Copy link

git102347501 commented Apr 19, 2019

What problem does this feature solve?

1.按照正常显示规则,当冻结表头时,表内数据如果未达到页面高度,此时表头和表行都不应该出现滚动条,而我发现无论如何现在表头右侧都会显示一个很不和谐的灰色滚动条出来,这不是一个规避表头对齐的最好方法。
2.而在数据超出表格高度后,表格内应该出现滚动条,同时表头冻结在最上方,此时才需要同步调整因为滚动条出现导致的表头td和内容th的对齐问题,而当数据列随着删除小于表格高度时,滚动条消失,间距应该重新调整到原始的状态。
3.当数据列宽自适应数据长度撑开或者缩小列宽的时候,表头需要跟随改变。
4.当表格数据宽度超出出现横向滚动条时,在横向滚动条左右滚动时,表头要同步对齐滚动。
以上是我个人认为冻结表头的基础功能,现在组件实现的功能一定程度上并没有解决这些问题,而是通过制定规则直接规避了这些问题。

What does the proposed API look like?

希望后续提供表头列th="auto"的属性,设定后,该列可以自动同步列宽到对应表行td的列宽,并同时针对以上问题进行改善。

@ng-zorro-bot
Copy link
Collaborator

Translation of this issue:


Why does the table's frozen header fail to complete the column width auto-synchronization? When there is no scroll bar below, why does the header have an ugly scroll bar on the right side?

What problem does this feature solve?

According to the normal display rule, when the header is frozen, the scroll bar does not appear, and the header should not display a very discordant scroll bar on the right side. When the table scrolls down to appear the scroll bar, the head and the head need to be adjusted immediately. Content column spacing. When the data adaptive length is extended or the column width is reduced, the header needs to be changed. When the horizontal scroll bar appears, the header should be scrolled synchronously. I think this is the basic function of freezing the header, and now the function implemented by the component. It does not solve the actual needs, but circumvents these problems.

What does the proposed API look like?

It is hoped that the attribute of the header column th="auto" will be provided subsequently. After setting, the column can automatically synchronize the column width to the column width of the corresponding table row td.

@vthinkxie
Copy link
Member

@git102347501 样式问题可以追踪 ant-design/ant-design#14211
我们会定期从 antd 设计文件进行同步

@git102347501
Copy link
Author

@ git102347501样式问题可以追踪ant-design / ant-design#14211
我们会定期从antd设计文件进行同步

亲,这个提交只提到了上述第一个问题,其他几个问题也有吗?

@vthinkxie
Copy link
Member

@ git102347501样式问题可以追踪ant-design / ant-design#14211
我们会定期从antd设计文件进行同步

亲,这个提交只提到了上述第一个问题,其他几个问题也有吗?

所有的样式均需要设计文件进行支持,我们会追踪这些设计规范

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants