onTableChange

dev_forum
hjm 6 years ago
parent 91dd24c8e6
commit 776583329d

@ -447,10 +447,7 @@ class studentsList extends Component{
onPressEnter = (e) => { onPressEnter = (e) => {
this.fetchAll(1) this.fetchAll(1)
} }
onPageChange = (page, pageSize) => {
this.fetchAll(page)
this.setState({ checkAllValue: false })
}
onCheckBoxChange = (checkedValues) => { onCheckBoxChange = (checkedValues) => {
this.setState({ this.setState({
@ -555,9 +552,11 @@ class studentsList extends Component{
}) })
return result && result.length > 0 return result && result.length > 0
} }
onTableChange = (pagination, filters, sorter) => { onTableChange = (pagination, filters, sorter) => {
console.log('Various parameters', pagination, filters, sorter); console.log('Various parameters', pagination, filters, sorter);
this.setState({ this.setState({
page: pagination.current,
sortedInfo: sorter, sortedInfo: sorter,
}, () => { }, () => {
this.fetchAll() this.fetchAll()
@ -668,7 +667,7 @@ class studentsList extends Component{
<div className="mt20 edu-back-white padding20 teacherList"> <div className="mt20 edu-back-white padding20 teacherList">
<CourseGroupChooserModal <CourseGroupChooserModal
props={this.props} props={{match: this.props.match, showNotification: this.props.showNotification}}
record={this.state.clickRecord} record={this.state.clickRecord}
fetchAll={this.fetchAll} fetchAll={this.fetchAll}
course_groups={course_groups} course_groups={course_groups}
@ -726,7 +725,7 @@ class studentsList extends Component{
total: page == 1 && this.state.application_list.length ? total_count + total_count / Math.floor(this.state.application_list.length + 20) : total_count , //数据总数量 total: page == 1 && this.state.application_list.length ? total_count + total_count / Math.floor(this.state.application_list.length + 20) : total_count , //数据总数量
pageSize: page == 1 && this.state.application_list.length ? this.state.application_list.length + 20 : 20, //显示几条一页 pageSize: page == 1 && this.state.application_list.length ? this.state.application_list.length + 20 : 20, //显示几条一页
current: page, current: page,
onChange: this.onPageChange // onChange: this.onPageChange
} : false} } : false}
></Table> ></Table>
</Checkbox.Group> </Checkbox.Group>

Loading…
Cancel
Save