|
|
@ -73,6 +73,9 @@ class commonWork extends Component{
|
|
|
|
componentDidUpdate(prevProps, prevState) {
|
|
|
|
componentDidUpdate(prevProps, prevState) {
|
|
|
|
|
|
|
|
|
|
|
|
if (prevProps.coursesidtype != this.props.coursesidtype||prevProps.match.params.category_id!=this.props.match.params.category_id) {
|
|
|
|
if (prevProps.coursesidtype != this.props.coursesidtype||prevProps.match.params.category_id!=this.props.match.params.category_id) {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
page:1
|
|
|
|
|
|
|
|
})
|
|
|
|
if (this.props.match.path === "/classrooms/:coursesId/common_homeworks/:category_id" || this.props.match.path === "/classrooms/:coursesId/common_homework/:category_id"||
|
|
|
|
if (this.props.match.path === "/classrooms/:coursesId/common_homeworks/:category_id" || this.props.match.path === "/classrooms/:coursesId/common_homework/:category_id"||
|
|
|
|
this.props.match.path === "/classrooms/:coursesId/group_homeworks/:category_id" || this.props.match.path === "/classrooms/:coursesId/group_homework/:category_id"
|
|
|
|
this.props.match.path === "/classrooms/:coursesId/group_homeworks/:category_id" || this.props.match.path === "/classrooms/:coursesId/group_homework/:category_id"
|
|
|
|
) {
|
|
|
|
) {
|
|
|
@ -220,11 +223,21 @@ class commonWork extends Component{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
onPageChange=(pageNumber)=>{
|
|
|
|
onPageChange=(pageNumber)=>{
|
|
|
|
|
|
|
|
let {search,order,category_id,checkAll}=this.state;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(checkAll===true){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
page:pageNumber,
|
|
|
|
|
|
|
|
checkBoxValues:[],
|
|
|
|
|
|
|
|
checkAll:false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
page:pageNumber,
|
|
|
|
page:pageNumber,
|
|
|
|
checkBoxValues:[]
|
|
|
|
checkBoxValues:[]
|
|
|
|
})
|
|
|
|
})
|
|
|
|
let {search,order,category_id}=this.state;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.getList(pageNumber,search,order,category_id);
|
|
|
|
this.getList(pageNumber,search,order,category_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|