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

Support max-height when setting the scroll={{ y:300 }} #65

Closed
codingfishman opened this issue Jul 18, 2016 · 2 comments
Closed

Support max-height when setting the scroll={{ y:300 }} #65

codingfishman opened this issue Jul 18, 2016 · 2 comments

Comments

@codingfishman
Copy link

When the scroll={{y:300}} is set to the table, and somehow the data is not enough to fullfill it, the height will keep being 300px, with the remaining space in blank empty.

The style height:300 is added to table body when the scroll set, and it's fixed. How about we make it to max-height:300 so it's flexible to support the situation when the data is less than the value?

I made a codePen demo here, you may check the link if it helps, thanks!

@huangshiqiang
Copy link

table scroll y 是否可以考虑从height改为max-height? ant-design/ant-design#2428
这样就导致了table不支持自适应高度了,为什么要把height改为max-height呢?例如我想将分页固定在页面底部,滚动条出现在分页上方,但是现在height改成max-height以后,导致滚动条没有在底部了,不能实现自适应的功能了。。。

@qianweichen
Copy link

table scroll y 是否可以考虑从height改为max-height? ant-design/ant-design#2428 这样就导致了table不支持自适应高度了,为什么要把height改为max-height呢?例如我想将分页固定在页面底部,滚动条出现在分页上方,但是现在height改成max-height以后,导致滚动条没有在底部了,不能实现自适应的功能了。。。

确实,max-height有些页面数据不够会有空白。 是否可以做成可配置的,自由选择max-height还是height

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

No branches or pull requests

3 participants