Merge pull request #4206 from ninjadq/open_add_member_modal_too_long

Fix bug open add member modal time too long
This commit is contained in:
Qian Deng 2018-02-01 14:57:47 +08:00 committed by GitHub
commit 3b36236dc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {