pagination icon indicating copy to clipboard operation
pagination copied to clipboard

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

Open NJZY8856 opened this issue 5 years ago • 3 comments

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

NJZY8856 avatar Feb 09 '21 02:02 NJZY8856

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

vercel[bot] avatar Feb 09 '21 02:02 vercel[bot]

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.

codecov[bot] avatar Feb 09 '21 02:02 codecov[bot]

Could you add a test case?

afc163 avatar Jan 02 '22 05:01 afc163