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

When datasource is empty ant set scroll in x at table component,the scrollbar should under the table, not under the table header #7142

Closed
renhe1990 opened this issue Aug 9, 2017 · 11 comments · Fixed by react-component/table#157

Comments

@renhe1990
Copy link

Version

2.12.5

Environment

window 7 、chrome 59.0.3071.115

Reproduction link

https://codepen.io/renhe1990/pen/vJmEMy

Steps to reproduce

1.create an empty table component.
2.set scroll={x:50000} (the width greater than screen width)

What is expected?

the scrollbar should under the table

What is actually happening?

the scrollbar under the table header

@afc163
Copy link
Member

afc163 commented Aug 9, 2017

I think scrollbar should not display when there is no data.

@afc163 afc163 closed this as completed in 1f18c93 Aug 9, 2017
@crazyair
Copy link
Member

@afc163 2.12.6 It still doesn't show the scroll bar

@crazyair
Copy link
Member

@afc163
Copy link
Member

afc163 commented Aug 23, 2017

What's your problem? Please file a new issue by http://new-issue.ant.design/

@crazyair
Copy link
Member

When there is no data, the width of the column is vertical and not good

@afc163
Copy link
Member

afc163 commented Sep 13, 2017

I will revert the fix of this issue due to break #7298 and react-component/table#163

I can't find a perfect solution so I gonne keep this original way.

@L1nY4n
Copy link

L1nY4n commented Sep 21, 2017

imageTo filter the list, I add a condition in one columns in view which is scrolled ,when no data show ,I can't scroll right to change or remove the conditions, To solve this, I add a tag block to show conditions which can be removed.
image @qq645381995

I think scrollbar is in need @afc163

@afc163
Copy link
Member

afc163 commented Sep 21, 2017

Sorry, scrollbar for empty data is hard to implement and bring a lot of other issues.

Your case is whole another problem, Try getPopupContainer of Select: #3438

@L1nY4n
Copy link

L1nY4n commented Sep 23, 2017

Actually I render a select component in each columns(more than 20), I think it's not the problem of render position.
Thank you for response and I would try other way. (Maybe add item to show empty in datalist and using colSpan props)

@yixuanwang26
Copy link

image
When datasource is empty, the scrollbar is under the table header..

@fanshipi
Copy link

image
When datasource is empty, the scrollbar is under the table header..

Have you solved the problem?

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

Successfully merging a pull request may close this issue.

6 participants