},
"dependencies": {
"font-awesome": "^4.7.0",
+ "rc-pagination": "^1.16.3",
"react": "16.2.0",
"react-dom": "16.2.0",
"react-router-dom": "4.2.2",
import React from 'react';
-
+import Pagination from 'util/pagination/index.jsx';
import './index.css';
class ResultFilter extends React.Component {
super(props);
this.state = {
+ current: 3,
selected: [{
'name': 'Category 1',
'data': [
//todo
}
+ onChange(page) {
+ console.log(page);
+ this.setState({
+ current: page,
+ });
+ }
+
render() {
let _this = this;
let filter = this.state.selected.map((item, i) => {
let filter_item=item["data"].map((s,index)=>{
return (
- <dd key={index} className="select-all selected"><a href="#">{s}ss</a></dd>
+ <dd key={index} className="select-all selected"><a href="#">{s}</a></dd>
)
});
</div>
</div>
+
+ <Pagination locale={en_US} onChange={this.onChange} current={this.state.current} total={25}></Pagination>
<div className="panel panel-default">
<div className="panel-heading">
Advanced Tables
--- /dev/null
+import React from 'react';
+import RcPagination from 'rc-pagination';
+import 'rc-pagination/dist/rc-pagination.min.css';
+import en_US from 'rc-pagination/es/locale/en_US.js';
+// General paging component
+class Pagination extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ return (
+ <div className="row">
+ <div className="col-md-12">
+ <RcPagination {...this.props}
+ hideOnSinglePage
+ showQuickJumper locale={en_US}/>
+ </div>
+ </div>
+ );
+ }
+}
+
+export default Pagination;
\ No newline at end of file
mkdirp "^0.5.1"
source-map-support "^0.4.15"
-babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
+babel-runtime@6.x, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
dependencies:
dependencies:
asap "~2.0.3"
-prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.6.0:
+prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0:
version "15.6.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca"
dependencies:
iconv-lite "0.4.19"
unpipe "1.0.0"
+rc-pagination@^1.16.3:
+ version "1.16.3"
+ resolved "http://registry.npm.taobao.org/rc-pagination/download/rc-pagination-1.16.3.tgz#2d3780a129c290c2e2e85a71b6723a8301484c2e"
+ dependencies:
+ babel-runtime "6.x"
+ prop-types "^15.5.7"
+
rc@^1.1.7:
version "1.2.6"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.6.tgz#eb18989c6d4f4f162c399f79ddd29f3835568092"