fix: 无分组的时候停止loading状态

This commit is contained in:
wenbo.dong 2017-07-26 21:39:07 +08:00
parent 9916ecbd7e
commit 56cb36a1ed

View File

@ -206,6 +206,7 @@ class ProjectList extends Component {
componentWillReceiveProps(nextProps) {
// 切换分组
if (this.props.currGroup !== nextProps.currGroup) {
if (nextProps.currGroup._id) {
this.props.fetchProjectList(nextProps.currGroup._id, this.props.currPage).then((res) => {
if (res.payload.data.errcode) {
message.error(res.payload.data.errmsg);
@ -213,6 +214,10 @@ class ProjectList extends Component {
this.props.changeTableLoading(false);
}
});
} else {
// 无分组的时候停止loading状态
this.props.changeTableLoading(false);
}
}
// 切换项目列表