SizeChanger is displayed automatically if the total is greater than 50 and the pageSize is not specified in the props
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
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 Report
Merging #321 (f827da9) into master (0bbe863) will not change coverage. The diff coverage is
100.00%.
@@ 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 dataPowered by Codecov. Last update 0bbe863...21e58ba. Read the comment docs.
Could you add a test case?