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 does not automatically scroll to the top when change page size #19465

Merged
merged 3 commits into from Nov 2, 2019

Conversation

MrHeer
Copy link
Contributor

@MrHeer MrHeer commented Oct 28, 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

close #19464

📝 Changelog

Language Changelog
🇺🇸 English fix table does not automatically scroll to the top when change page size
🇨🇳 Chinese 修复当改变表格每页大小时不滚动到第一行的问题

☑️ 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

fix table does not automatically scroll to the top when change page size
close ant-design#19464
@netlify
Copy link

netlify bot commented Oct 28, 2019

Deploy preview for ant-design ready!

Built with commit 019f466

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

@codecov
Copy link

codecov bot commented Oct 28, 2019

Codecov Report

Merging #19465 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19465      +/-   ##
==========================================
+ Coverage   97.78%    97.8%   +0.01%     
==========================================
  Files         282      282              
  Lines        7640     7639       -1     
  Branches     2155     2155              
==========================================
  Hits         7471     7471              
+ Misses        169      168       -1
Impacted Files Coverage Δ
components/table/Table.tsx 99.48% <100%> (ø) ⬆️
components/date-picker/WeekPicker.tsx 100% <0%> (ø) ⬆️
components/date-picker/wrapPicker.tsx 100% <0%> (+1.09%) ⬆️

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 92caa2d...019f466. Read the comment docs.

@afc163
Copy link
Member

afc163 commented Oct 29, 2019

来个用例。

@MrHeer
Copy link
Contributor Author

MrHeer commented Oct 29, 2019

可以直接修改固定表头那个demo吗

@afc163
Copy link
Member

afc163 commented Oct 29, 2019

demo ?最好是用 test case 来保证逻辑。

@MrHeer
Copy link
Contributor Author

MrHeer commented Oct 29, 2019

我捣鼓了半天也没有找到好的方法去测试 😂

@afc163
Copy link
Member

afc163 commented Oct 29, 2019

可是试试监听 scrollTo 是否被调用过:

expect(scrollToSpy).toHaveBeenCalled();

@MrHeer
Copy link
Contributor Author

MrHeer commented Oct 29, 2019

好的,谢谢,我去试试

Co-Authored-By: 骗你是小猫咪 <darryshaw@gmail.com>
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.

Does not automatically scroll to the top when change page size on the non-first page
3 participants