From 1879a2e7f02c4d0ca260ee3b8d18c6e995483a74 Mon Sep 17 00:00:00 2001 From: ctxdl Date: Mon, 18 Dec 2017 10:21:31 +0100 Subject: [PATCH] Error that prevented clicking on Invite Users, All Students, User Administration (#741) --- app/users/invite-users/invite-users.component.html | 2 +- app/users/invite-users/invite-users.component.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/users/invite-users/invite-users.component.html b/app/users/invite-users/invite-users.component.html index dde5c052c..0fb42cddd 100644 --- a/app/users/invite-users/invite-users.component.html +++ b/app/users/invite-users/invite-users.component.html @@ -14,7 +14,7 @@

{{ 'invite users' | translate }}

separatorKeys="[32]" (onRemove)="onRemove($event)" (onAdd)="onAdd($event)" - [transform]="validateEmail" + [onAdding]="validateEmail" [secondaryPlaceholder] ="('Enter email ids' | translate)" [placeholder]="('+ Email')" ngDefaultControl #input> diff --git a/app/users/invite-users/invite-users.component.ts b/app/users/invite-users/invite-users.component.ts index a74becce2..99bbb0438 100644 --- a/app/users/invite-users/invite-users.component.ts +++ b/app/users/invite-users/invite-users.component.ts @@ -1,6 +1,7 @@ import { Component } from '@angular/core'; import { ToasterService } from 'angular2-toaster'; import { TranslateService } from 'ng2-translate'; +import { Observable } from 'rxjs/Rx'; import { UserService } from '../user.service'; import { User } from '../user.model'; @@ -22,9 +23,10 @@ export class InviteUsersComponent { private userService: UserService, private translateService: TranslateService) {} - public validateEmail(item: any): string { + public validateEmail(item: any): Observable { if (User.validateEmail(item)) { - return `${item}`; + return Observable + .of(item); } }