-
-
Notifications
You must be signed in to change notification settings - Fork 332
Add pagerCount props #162
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
Open
liuchuzhang
wants to merge
15
commits into
react-component:master
Choose a base branch
from
liuchuzhang:jump
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add pagerCount props #162
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9cfc49d
Add bonudary jumper hide api
liuchuzhang b68fb12
Add pagerCount props
liuchuzhang 61b0dc8
Update docs
liuchuzhang 26baf18
Fix
liuchuzhang 5b5dc27
Updates
liuchuzhang e958ba1
reset example
liuchuzhang bc83767
Add `jump-first` and `jump-last` renders
liuchuzhang 87ff9b0
Fix
liuchuzhang 22560e3
Update docs
liuchuzhang ede47ce
Updates
liuchuzhang b708827
Updates
liuchuzhang 01f707f
Fix
liuchuzhang 79483b1
Add test case
liuchuzhang f76eb56
Update
liuchuzhang 9a55e81
Fix
liuchuzhang 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 @@ | ||
placeholder |
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,37 @@ | ||
import 'rc-pagination/assets/index.less'; | ||
import Pagination from 'rc-pagination'; | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import Select from 'rc-select'; | ||
import 'rc-select/assets/index.css'; | ||
|
||
const itemRender = (current, type, element) => { | ||
const hideItems = ['jump-last', 'jump-first']; | ||
|
||
if (hideItems.includes(type)) { | ||
return null; | ||
} | ||
|
||
return element; | ||
}; | ||
|
||
function onShowSizeChange(current, pageSize) { | ||
console.log(current, pageSize); | ||
} | ||
|
||
ReactDOM.render( | ||
<div> | ||
<Pagination total={500} itemRender={itemRender} pagerCount={10} showPrevNextJumpers={false} /> | ||
|
||
<Pagination | ||
selectComponentClass={Select} | ||
showSizeChanger | ||
onShowSizeChange={onShowSizeChange} | ||
defaultCurrent={3} | ||
total={500} | ||
pagerCount={7} | ||
/> | ||
|
||
<Pagination total={500} pagerCount={8} /> | ||
</div> | ||
, document.getElementById('__react-content')); |
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
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.