Merge branch 'DEVELOP_FE' of ssh://git.eclipse.org:29418/elogbook/elogbookFE into DEVELOP_FE
diff --git a/src/app/common-components/autocomplete/autocomplete.component.ts b/src/app/common-components/autocomplete/autocomplete.component.ts
index 65de251..66312ea 100644
--- a/src/app/common-components/autocomplete/autocomplete.component.ts
+++ b/src/app/common-components/autocomplete/autocomplete.component.ts
@@ -25,17 +25,20 @@
}
searchChanged(newValue) {
- this.responsibilityForwarding = newValue;
+ if (newValue == '') {
+ newValue = null;
+ }
+ this.responsibilityForwarding = newValue;
this.responsibilityForwardingChange.emit(newValue);
}
setAssignedUserSuggestions() {
- this.notificationService.getAssignedUserSuggestions().subscribe(res => {
+ this.notificationService.getAssignedUserSuggestions().subscribe(res => {
this.inputElementList = res;
this.createItemList();
},
error => { console.log(error); }
- );
+ );
}
filterQuery() {
@@ -97,10 +100,13 @@
}
- select(item: any) {
- this.responsibilityForwarding = item.name;
+ select(item: any) {
this.filteredList = [];
- this.position = -1;
+ this.position = -1;
+ if (item.name == '') {
+ item.name = null;
+ }
+ this.responsibilityForwarding = item.name;
this.responsibilityForwardingChange.emit(item.name);
}
@@ -114,7 +120,7 @@
handleFocus() {
if (!this.alreadyFocused) {
- this.setAssignedUserSuggestions();
+ this.setAssignedUserSuggestions();
this.alreadyFocused = true;
}
}