Skip to content

fix(Pagination): onChange should be forbidden when total is zero #347

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

Conversation

PorkSashimi
Copy link
Contributor

@PorkSashimi PorkSashimi commented Sep 18, 2021

涉及组件

  • Pagination

问题描述

  • total = 0 时,不应该触发 onChange 事件。

复现地址

@vercel
Copy link

vercel bot commented Sep 18, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/pagination/4RGnwrCHaf8tTVmTLRFNDDuTiThi
✅ Preview: https://pagination-git-fork-travischenn1996-trav-50a62f-react-component.vercel.app

@PorkSashimi PorkSashimi changed the title fix(Pagination): handle_change is forbidden when total is falsy or zero fix(Pagination): handleChange is forbidden when total is falsy or zero Sep 18, 2021
@PorkSashimi PorkSashimi changed the title fix(Pagination): handleChange is forbidden when total is falsy or zero fix(Pagination): handleChange should be forbidden when total is falsy or zero Sep 18, 2021
@PorkSashimi PorkSashimi changed the title fix(Pagination): handleChange should be forbidden when total is falsy or zero fix(Pagination): handleChange should be forbidden when total is zero Sep 18, 2021
@PorkSashimi PorkSashimi changed the title fix(Pagination): handleChange should be forbidden when total is zero fix(Pagination): onChange should be forbidden when total is zero Sep 18, 2021
@codecov
Copy link

codecov bot commented Sep 18, 2021

Codecov Report

Merging #347 (ee7e7cd) into master (24d24d6) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #347      +/-   ##
==========================================
+ Coverage   92.35%   92.40%   +0.04%     
==========================================
  Files           3        3              
  Lines         327      329       +2     
  Branches      112      113       +1     
==========================================
+ Hits          302      304       +2     
  Misses         25       25              
Impacted Files Coverage Δ
src/Pagination.jsx 91.01% <100.00%> (+0.07%) ⬆️

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 24d24d6...ee7e7cd. Read the comment docs.

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.

2 participants