-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
Custom render support for divider #122
base: master
Are you sure you want to change the base?
Custom render support for divider #122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove lock file
@@ -0,0 +1,15794 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove lock file.
@@ -347,7 +347,11 @@ export default class Pagination extends React.Component { | |||
onChange={this.handleKeyUp} | |||
size="3" | |||
/> | |||
<span className={`${prefixCls}-slash`}>/</span> | |||
<span className={`${prefixCls}-divider`} > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think use itemRender for this feature is a good idea. Maybe just add a prop dividerSymbol
for it.
Hi.
This PR adds support for customizing the "slash" divider.
At our company we'd rather display "1 of 30" instead of "1 / 30".
I also added itemRender tests for simple pagination.
Things to keep aware:
I wrapped the slash divider with a
<span>
with a styleless class for testing purposes. Could it brake production applications?Also, the first argument of the
itemRender
is the page number(an integer) , which isnt relevant for the divider. I passed the current page, because if I passednull
, it could brake production applications that rely on integer methods without null check.Thanks.