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

fix: Table scroll.x max-content not working in Chrome #19284

Merged
merged 1 commit into from Oct 18, 2019
Merged

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Oct 18, 2019

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

react-component/table#378

💡 Background and solution

Reproduce link:

❌ 3.24.0:https://codesandbox.io/s/unruffled-pine-9q76y
✅ 3.23.6:https://codesandbox.io/s/crazy-water-vyiii

image

to

image

📝 Changelog

Language Changelog
🇺🇸 English Fix Table scroll={{ x: 'max-content' }} rendered without scrollbar problem in Chrome.
🇨🇳 Chinese 修复 Table scroll.x 设置 max-content 失效导致横向滚动失效的问题。

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

View rendered components/table/demo/grouping-columns.md

@netlify
Copy link

netlify bot commented Oct 18, 2019

Deploy preview for ant-design ready!

Built with commit dd51adf

https://deploy-preview-19284--ant-design.netlify.com

@codecov
Copy link

codecov bot commented Oct 18, 2019

Codecov Report

Merging #19284 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19284      +/-   ##
==========================================
- Coverage   97.78%   97.78%   -0.01%     
==========================================
  Files         282      282              
  Lines        7625     7624       -1     
  Branches     2144     2097      -47     
==========================================
- Hits         7456     7455       -1     
  Misses        169      169
Impacted Files Coverage Δ
components/table/Table.tsx 99.48% <0%> (-0.01%) ⬇️
components/upload/UploadList.tsx 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b280b63...dd51adf. Read the comment docs.

@afc163 afc163 merged commit 13d219c into master Oct 18, 2019
@afc163 afc163 deleted the fix-table-style branch October 18, 2019 10:34
@YingJian-hu
Copy link

这个版本的更新导致了table设置宽度失败啊

@afc163
Copy link
Member Author

afc163 commented Oct 24, 2019

@huyingjian888 给个重现。

@YingJian-hu
Copy link

我代码里设置了scroll={{x: 1200}},里面table.columns设置宽度总长超过1200的时候,导致里面所有表格宽度设置失效,表格变形,以前版本也这么设置不会有问题

@YingJian-hu
Copy link

去掉属性scroll={{x: xxxx}}又恢复正常

@yoyo837
Copy link
Contributor

yoyo837 commented Oct 24, 2019

给在线demo吧

@isa-lr
Copy link

isa-lr commented Oct 29, 2019

antd版本:3.24.3
浏览器:chrome
table设置 scroll={{x:'max-content'}},column设置最右侧固定,也会出现表格异常显示问题

@filipjnc
Copy link

filipjnc commented Feb 25, 2020

@afc163 This commit has broken scrollable tables with long texts in expanded rows.
Repro: https://codesandbox.io/s/youthful-edison-uf8tx
Switch from 3.24.2 to 3.24.1 to see the difference.

Best combined behavior for big tables on small screens is in 3.23.2. After that it's not optimal at all.

@fengyun2
Copy link

"antd": "3.26.12",在ie11下,table设置 scroll={{x:'max-content'}},无论column总宽度为多少,总会出现导致横向滚动出现

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

Successfully merging this pull request may close these issues.

None yet

6 participants