glud-component
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -175,4 +175,6 @@ 'use strict'; | ||
}, _this.onChangePage = function (page) { | ||
_this.setState({ | ||
currentPage: page | ||
_this.setState(function () { | ||
return { | ||
currentPage: page | ||
}; | ||
}); | ||
@@ -191,7 +193,7 @@ | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(nextProps) { | ||
value: function componentWillReceiveProps(nextProps, prevState) { | ||
// this.handleCurrentPage(nextProps) | ||
this.setState({ | ||
paginations: getPagination(getTotalRecord(nextProps.dataList.length, nextProps.totalRecord), nextProps.viewPerPage), | ||
currentPage: this.handleCurrentPage(nextProps) ? 1 : this.state.currentPage | ||
currentPage: this.handleCurrentPage(nextProps) ? 1 : prevState.currentPage | ||
}); | ||
@@ -198,0 +200,0 @@ } |
{ | ||
"name": "glud-component", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "repository": { |
1447852
5210