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(pagination): fix pageSize param when page change #4450

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

1379255913
Copy link
Contributor

@1379255913 1379255913 commented Jul 30, 2024

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

表格改变每页行数时,@page-change事件参数不正确是因为在pageSize发生改变且会改变目前current值时,触发的handlePageChange会先执行setInnerPageSize,如果没有对onPageSize进行处理,会无法更新pageSize的值,而后触发的toPage函数获取pageInfo时,会尝试从props中进行获取,这就会导致获取不到最新的pageSize,从而引发bug

这里发现原来的isTriggerChange仅在上述情况下会使用,所以将其改为了pageInfo用于直接传入数据,避免了从props中无法出现最新值的问题

📝 更新日志

  • fix(Pagination): 修复paginationpageSize改变时onChange无法获取最新pageSize的问题

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link
Contributor

完成

@uyarn uyarn changed the title fix(pagination): 修复pagination在pageSize改变时onChange无法获取最新pageSize(#4430) fix(pagination): fix pageSize param when page change Aug 5, 2024
@uyarn uyarn merged commit 17918f1 into Tencent:develop Aug 6, 2024
6 checks passed
@github-actions github-actions bot mentioned this pull request Aug 16, 2024
16 tasks
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

2 participants