Created
June 17, 2015 15:25
-
-
Save bigardone/7db0b4b463155f360546 to your computer and use it in GitHub Desktop.
Paginator Section
This file contains 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.PaginatorSection = React.createClass( | |
{ | |
displayName: "PaginatorSection", | |
_handleOnClick: function(e) { | |
return this.props.onPaginate(e) | |
}, | |
render: function() { | |
var e; | |
return this.props.totalPages > 1 ? React.DOM.ul({className: "pagination"}, function() { | |
var t, n, r; | |
for (r = [], e = t = 1, n = this.props.totalPages; n >= 1 ? n >= t : t >= n; e = n >= 1 ? ++t : --t) | |
r.push(React.DOM.li({key: e}, e === this.props.currentPage ? React.DOM.span(null, "\xa0") : PaginatorLink({pageNumber: e,onPaginatorLinkClick: this._handleOnClick}))); | |
return r | |
}.call(this)) : React.DOM.div(null, "\xa0") | |
} | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you soooo much for converting this!