mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 06:03:38 +08:00
修复本地模式的 table 分页 current 页面失效的问题
This commit is contained in:
parent
b7d204967d
commit
fb3b16ddc2
@ -33,7 +33,8 @@ for (let i=0; i<18; i++) {
|
||||
}
|
||||
|
||||
var pagination = {
|
||||
total: data.length
|
||||
total: data.length,
|
||||
current: 2
|
||||
};
|
||||
|
||||
React.render(<Table columns={columns} dataSource={data} pagination={pagination} />
|
||||
|
@ -136,9 +136,13 @@ export default React.createClass({
|
||||
this.props.rowSelection.onSelectAll(checked, selectedRows);
|
||||
}
|
||||
},
|
||||
handlePageChange(current = 1) {
|
||||
handlePageChange(current) {
|
||||
let pagination = this.state.pagination || {};
|
||||
pagination.current = current;
|
||||
if (current) {
|
||||
pagination.current = current;
|
||||
} else {
|
||||
pagination.current = pagination.current || 1;
|
||||
}
|
||||
this.setState({
|
||||
pagination: pagination
|
||||
}, this.fetch);
|
||||
|
Loading…
Reference in New Issue
Block a user