Merge pull request #8916 from AllForNothing/nightly

fix add-member nightly case failure
This commit is contained in:
Will Sun 2019-09-03 11:27:05 +08:00 committed by GitHub
commit cf1b7cbc41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,6 +105,7 @@ export class AddMemberComponent implements AfterViewChecked, OnInit, OnDestroy {
this.isMemberNameValid = cont.valid;
if (cont.valid) {
this.checkOnGoing = true;
this.ref.detectChanges();
forkJoin(this.userService.getUsersNameList(cont.value, 20), this.memberService
.listMembers(this.projectId, cont.value)).subscribe((res: Array<any>) => {
this.userLists = res[0];
@ -122,13 +123,14 @@ export class AddMemberComponent implements AfterViewChecked, OnInit, OnDestroy {
}
}
});
let changeTimer = setInterval(() => this.ref.detectChanges(), 200);
setTimeout(() => {
clearInterval(changeTimer);
}, 2000);
}
let changeTimer = setInterval(() => this.ref.detectChanges(), 200);
setTimeout(() => {
clearInterval(changeTimer);
}, 2000);
}, error => {
this.checkOnGoing = false;
this.ref.detectChanges();
});
} else {
this.memberTooltip = 'MEMBER.USERNAME_IS_REQUIRED';