-
-
Notifications
You must be signed in to change notification settings - Fork 333
feat: showSizeChanger accept SelectProps #597
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
Merged
afc163
merged 20 commits into
react-component:master
from
prakashks20:feature/development/pageSizeChanger-option-for-pagination
Sep 22, 2024
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f4663b9
Add pageSizeChanger props for handling the page size Select component…
prakashks20 df9e8e6
Updated test case file
prakashks20 2d574bd
Code review changes
prakashks20 3eeaf57
Fixed for test cases coverage failed on the GitHub actions
prakashmallow 7bdf3b2
Code review changes
prakashks20 af3e072
Remove unwanted codes
prakashks20 d670bfb
chore: pass showSizeChanger to Select component
afc163 68aa2fe
fix types
afc163 da8303b
fix showSizeChanger
afc163 1525fd6
update README.md
afc163 e52999f
update README.md
afc163 b557487
update README.md
afc163 70d46a3
update README.md
afc163 e16e8b6
fix eslint
afc163 4c0916c
fix eslint
afc163 66b5c64
fix test case
afc163 ab723a5
fix test case
afc163 c6405f3
add test case
afc163 fbb1ffd
add test case
afc163 f4c6b4b
fix typo
afc163 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| title: showSizeChanger | ||
| nav: | ||
| title: Demo | ||
| path: /demo | ||
| --- | ||
|
|
||
| <code src="../examples/showSizeChanger.tsx"></code> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| import React from 'react'; | ||
| import Pagination from 'rc-pagination'; | ||
| import Select from 'rc-select'; | ||
| import '../../assets/index.less'; | ||
|
|
||
| export default () => { | ||
| const onPageSizeOnChange = (value) => { | ||
| console.log(value); | ||
| }; | ||
|
|
||
| return ( | ||
| <> | ||
| <Pagination | ||
| defaultCurrent={1} | ||
| total={50} | ||
| selectComponentClass={Select} | ||
| showSizeChanger={false} | ||
| /> | ||
| <Pagination | ||
| defaultCurrent={1} | ||
| total={50} | ||
| selectComponentClass={Select} | ||
| showSizeChanger | ||
| /> | ||
| <Pagination | ||
| defaultCurrent={1} | ||
| total={50} | ||
| selectComponentClass={Select} | ||
| showSizeChanger={{ | ||
| options: [ | ||
| { value: '10', label: '10 条每页' }, | ||
| { value: '25', label: '25 条每页' }, | ||
| { value: '100', label: '100 条每页' }, | ||
| ], | ||
| className: 'my-select', | ||
| showSearch: true, | ||
| onChange: onPageSizeOnChange, | ||
| }} | ||
| /> | ||
| </> | ||
| ); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.