diff --git a/dist/PageView.js b/dist/PageView.js index 4a8e40f7..c4f5793e 100755 --- a/dist/PageView.js +++ b/dist/PageView.js @@ -26,8 +26,7 @@ var PageView = React.createClass({ React.createElement( Link, _extends({}, this.props, { - to: this.props.location, - query: query }), + to: { pathname: this.props.location, query: query } }), this.props.page ) ); diff --git a/dist/PaginationBoxView.js b/dist/PaginationBoxView.js index 2767108b..ba4613b3 100755 --- a/dist/PaginationBoxView.js +++ b/dist/PaginationBoxView.js @@ -32,9 +32,9 @@ var PaginationBoxView = React.createClass({ pageNum: 10, pageRangeDisplayed: 2, marginPagesDisplayed: 3, - previousLabel: 'Previous', - nextLabel: 'Next', - breakLabel: '...' + previousLabel: "Previous", + nextLabel: "Next", + breakLabel: "..." }; }, @@ -51,7 +51,7 @@ var PaginationBoxView = React.createClass({ this.setState({ selected: selected }); - if (typeof this.props.clickCallback !== 'undefined' && typeof this.props.clickCallback === 'function') { + if (typeof this.props.clickCallback !== "undefined" && typeof this.props.clickCallback === "function") { this.props.clickCallback({ selected: selected }); } }, @@ -92,7 +92,7 @@ var PaginationBoxView = React.createClass({ { onClick: this.handlePreviousPage, className: previousClasses }, React.createElement( Link, - { query: previousQuery, to: location.pathname }, + { to: { pathname: location.pathname, query: previousQuery } }, this.props.previousLabel ) ); @@ -120,7 +120,7 @@ var PaginationBoxView = React.createClass({ { onClick: this.handleNextPage, className: nextClasses }, React.createElement( Link, - { query: nextQuery, to: location.pathname }, + { to: { pathname: location.pathname, query: nextQuery } }, this.props.nextLabel ) ); diff --git a/dist/PaginationListView.js b/dist/PaginationListView.js index fc6db42f..2f5231b9 100755 --- a/dist/PaginationListView.js +++ b/dist/PaginationListView.js @@ -1,9 +1,11 @@ 'use strict'; var _ = require('underscore'); -var React = require('react/addons'); +var React = require('react'); var PageView = require('./PageView'); +var createFragment = require('react-addons-create-fragment'); + var PaginationListView = React.createClass({ displayName: 'PaginationListView', @@ -15,6 +17,7 @@ var PaginationListView = React.createClass({ var pageViews = _.range(0, this.props.pageNum).map((function (page) { return React.createElement(PageView, { onClick: this.props.onPageSelected.bind(null, page), + generateLinkFor: this.props.generateLinkFor, selected: this.props.selected === page, activeClass: this.props.activeClass, page: page + 1, @@ -47,6 +50,7 @@ var PaginationListView = React.createClass({ var pageView = React.createElement(PageView, { onClick: this.props.onPageSelected.bind(null, index), + generateLinkFor: this.props.generateLinkFor, selected: this.props.selected === index, activeClass: this.props.activeClass, page: index + 1, @@ -81,7 +85,7 @@ var PaginationListView = React.createClass({ return React.createElement( 'ul', { className: this.props.subContainerClassName }, - React.addons.createFragment(items) + createFragment(items) ); } }); diff --git a/package.json b/package.json index 3bc5b784..83c2a748 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,12 @@ "url": "https://github.com/AdeleD/react-paginate/issues" }, "dependencies": { - "underscore": "^1.7.0", - "classnames": "^1.2.0" + "babel": "^5.8.35", + "babel-core": "^5.8.35", + "babel-loader": "^5.4.0", + "classnames": "^1.2.0", + "react-addons-create-fragment": "^0.14.7", + "underscore": "^1.7.0" }, "devDependencies": { "babelify": "^6.0.2", @@ -34,9 +38,9 @@ "gulp-uglify": "^1.1.0", "jest-cli": "^0.2.2", "jquery": "^2.1.3", - "react": "~0.13.1", - "react-router": "^0.13.3", - "react-tools": "~0.12.2", + "react": "0.14.7", + "react-addons-create-fragment": "^0.14.7", + "react-router": "^2.0.1", "serve-static": "^1.9.1", "vinyl-buffer": "^1.0.0", "vinyl-source-stream": "~1.0.0", diff --git a/react_components/PageView.js b/react_components/PageView.js index 0855b65b..dfb37cdb 100755 --- a/react_components/PageView.js +++ b/react_components/PageView.js @@ -19,8 +19,7 @@ var PageView = React.createClass({ return (
  • + to={{ pathname: this.props.location, query }}> {this.props.page}
  • diff --git a/react_components/PaginationBoxView.js b/react_components/PaginationBoxView.js index 5d4827e6..525beab9 100755 --- a/react_components/PaginationBoxView.js +++ b/react_components/PaginationBoxView.js @@ -89,7 +89,7 @@ var PaginationBoxView = React.createClass({ } return (
  • - + {this.props.previousLabel}
  • @@ -115,7 +115,7 @@ var PaginationBoxView = React.createClass({ } return (
  • - + {this.props.nextLabel}
  • diff --git a/react_components/PaginationListView.js b/react_components/PaginationListView.js index 2c8a9a87..3fe2cb72 100755 --- a/react_components/PaginationListView.js +++ b/react_components/PaginationListView.js @@ -1,9 +1,11 @@ 'use strict'; var _ = require('underscore'); -var React = require('react/addons'); +var React = require('react'); var PageView = require('./PageView'); +var createFragment = require('react-addons-create-fragment'); + var PaginationListView = React.createClass({ render: function() { var items = {}; @@ -14,6 +16,7 @@ var PaginationListView = React.createClass({ return ( - {React.addons.createFragment(items)} + {createFragment(items)} ); }