Fix bug open add member modal time too long

This commit is contained in:
Deng, Qian 2018-02-01 12:57:40 +08:00
parent 9f42b42ffd
commit 26d6a04257

View File

@ -46,7 +46,7 @@ import {Project} from "../../project";
templateUrl: 'add-member.component.html',
styleUrls: ['add-member.component.css'],
providers: [UserService],
changeDetection: ChangeDetectionStrategy.OnPush
changeDetection: ChangeDetectionStrategy.Default
})
export class AddMemberComponent implements AfterViewChecked, OnInit, OnDestroy {
@ -225,6 +225,7 @@ export class AddMemberComponent implements AfterViewChecked, OnInit, OnDestroy {
}
openAddMemberModal(): void {
this.currentForm.reset();
this.member = new Member();
this.addMemberOpened = true;
this.hasChanged = false;
@ -233,9 +234,6 @@ export class AddMemberComponent implements AfterViewChecked, OnInit, OnDestroy {
this.isMemberNameValid = true;
this.memberTooltip = 'MEMBER.USERNAME_IS_REQUIRED';
this.selectUserName = [];
setTimeout(() => {
setInterval(() => this.ref.markForCheck(), 200);
}, 2000);
}
handleValidation(): void {