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

SizeChanger is displayed automatically if the total is greater than 50 and the pageSize is not specified in the props #321

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NJZY8856
Copy link

@NJZY8856 NJZY8856 commented Feb 9, 2021

SizeChanger will appear automatically when total is greater than 50, but if the size of pageszie is specified in props, clicking sizeChanger will not respond.Although this can be avoided in development by using defaultPagesize instead of pageszie or manually setting the showSizeChanger property to false, many older systems upgrade from antd 3.x or even antd 2.x to 4.x. Many older code specifies pagesize. It can be a lot of work to use defaultPagesize instead of pageszie or manually setting the showSizeChanger property to false.And unavoidably cause problems, so I think just simply by total more than 50 shows sizeChanger is not very reasonable, so it is easy to appear click sizeChanger without reaction, with the intention of improving the user experience, in conclusion, I think sizeChanger conditions should be changed to auto show, the total is not specified in more than 50 and props pageSzie would be better

@vercel
Copy link

vercel bot commented Feb 9, 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/n9ebrpcr6
✅ Preview: https://pagination-git-fork-njzy8856-sizechanger.react-component.now.sh

@codecov
Copy link

codecov bot commented Feb 9, 2021

Codecov Report

Merging #321 (f827da9) into master (0bbe863) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #321   +/-   ##
=======================================
  Coverage   91.43%   91.43%           
=======================================
  Files           3        3           
  Lines         327      327           
  Branches      113      114    +1     
=======================================
  Hits          299      299           
  Misses         28       28           
Impacted Files Coverage Δ
src/Pagination.jsx 90.94% <100.00%> (ø)

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 0bbe863...21e58ba. Read the comment docs.

@afc163
Copy link
Member

afc163 commented Jan 2, 2022

Could you add a test case?

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