mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
parent
a0ccd6c8b3
commit
4653b9ad23
@ -59,7 +59,9 @@ export class ActivitiPeopleSearch implements OnInit, AfterViewInit {
|
||||
.valueChanges
|
||||
.debounceTime(200)
|
||||
.subscribe((event) => {
|
||||
this.onSearch.emit(event);
|
||||
if (event) {
|
||||
this.onSearch.emit(event);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -93,7 +95,11 @@ export class ActivitiPeopleSearch implements OnInit, AfterViewInit {
|
||||
|
||||
getDisplayUser(user: User): string {
|
||||
let firstName = user.firstName && user.firstName !== 'null' ? user.firstName : 'N/A';
|
||||
let lastName = user.lastName && user.lastName !== 'null' ? user.lastName : 'N/A';
|
||||
let lastName = user.lastName && user.lastName !== 'null' ? user.lastName : 'N/A';
|
||||
return firstName + ' - ' + lastName;
|
||||
}
|
||||
|
||||
cleanSearch() {
|
||||
this.searchUser.reset();
|
||||
}
|
||||
}
|
||||
|
@ -25,11 +25,11 @@
|
||||
<activiti-people-search (onSearch)="searchUser($event)"
|
||||
(onRowClicked)="involveUser($event)"
|
||||
[results]="peopleSearch$"
|
||||
[iconImageUrl]="iconImageUrl">
|
||||
[iconImageUrl]="iconImageUrl" #activitipeoplesearch>
|
||||
</activiti-people-search>
|
||||
</div>
|
||||
<div class="mdl-dialog__actions">
|
||||
<button type="button" id="close-people-dialog" (click)="cancel()" class="mdl-button close">
|
||||
<button type="button" id="close-people-dialog" (click)="activitipeoplesearch.cleanSearch();cancel()" class="mdl-button close">
|
||||
{{'PEOPLE.DIALOG_CLOSE' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user