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

Expanded row in scrollable table does not break into lines (commit break) #21596

Closed
1 task done
filipjnc opened this issue Feb 25, 2020 · 4 comments
Closed
1 task done

Comments

@filipjnc
Copy link

filipjnc commented Feb 25, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. Open the reproduction env in a tablet-size window
  2. Expand a row

What is expected?

The contents in the expanded row break into lines (like in 3.24.1 or better yet in 3.23.2)

What is actually happening?

The contents in the expanded row display in one line and enlarge the scrollable area to thousands of pixels.

Environment Info
antd 3.24.2
React Irrespectively
System Irrespectively
Browser Irrespectively

This has been introduced with this commit: #19284
Best behavior was achievable in 3.23.2.

@afc163
Copy link
Member

afc163 commented Feb 26, 2020

If you turn on scroll.x to any value, scroll bar should be shown in small screen, I believe it is a expected behavior. The behavior of 3.23.2 is not different to table without scroll prop.

@afc163 afc163 closed this as completed Feb 26, 2020
@filipjnc
Copy link
Author

@afc163 I agree with the first sentence only partly. If the table has say is 500px wide unexpanded and the screen is 320px, yes it should show be scrollable. However, if the expanded row is shown, I expect the table to stay 500px wide and not 3000px with a long one line text. Some word-break must be implemented, otherwise the UX is bad and most use cases for expanded rows are useless now.

In 3.23.2 I could still scroll left and right and the expanded row remained 500px wide on opening.

afc163 added a commit to react-component/table that referenced this issue Feb 26, 2020
@afc163
Copy link
Member

afc163 commented Feb 26, 2020

I think you have the point, I tweak it in react-component/table@9d6f5be and released rc-table@6.10.13

Try remove node_modules/yarn.lock/package-lock.json and reinstall it.

@filipjnc
Copy link
Author

@afc163 now it's perfect! Hope it stays like it is. Congrats on release of 4.0.0, looking forward to migrate.

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

2 participants