diff --git a/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-boolean-decision/dynamic-field-boolean-decision.component.html b/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-boolean-decision/dynamic-field-boolean-decision.component.html index acefeb835..7899a785f 100644 --- a/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-boolean-decision/dynamic-field-boolean-decision.component.html +++ b/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-boolean-decision/dynamic-field-boolean-decision.component.html @@ -1,5 +1,5 @@
- + Yes
No diff --git a/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-checkbox/dynamic-field-checkbox.html b/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-checkbox/dynamic-field-checkbox.html index 20064c7c4..e4aaf4246 100644 --- a/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-checkbox/dynamic-field-checkbox.html +++ b/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-checkbox/dynamic-field-checkbox.html @@ -1,5 +1,5 @@
- {{field.data.label}} + {{field.data.label}}
diff --git a/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-dropdown/dynamic-field-dropdown.html b/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-dropdown/dynamic-field-dropdown.html index 783cef0fb..a0ba2b0fd 100644 --- a/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-dropdown/dynamic-field-dropdown.html +++ b/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-dropdown/dynamic-field-dropdown.html @@ -1,6 +1,6 @@
- + {{opt.label}} {{'GENERAL.VALIDATION.REQUIRED' | translate}} diff --git a/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-radiobox/dynamic-field-radiobox.component.html b/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-radiobox/dynamic-field-radiobox.component.html index 4b3613cd3..2153f7a93 100644 --- a/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-radiobox/dynamic-field-radiobox.component.html +++ b/dmp-frontend/src/app/form/dynamic-fields/dynamic-field-radiobox/dynamic-field-radiobox.component.html @@ -1,5 +1,5 @@
- +
{{option.label}}
diff --git a/dmp-frontend/src/app/form/dynamic-fields/dynamic-form-field.component.html b/dmp-frontend/src/app/form/dynamic-fields/dynamic-form-field.component.html index f0c33eb4c..ddfc08b4e 100644 --- a/dmp-frontend/src/app/form/dynamic-fields/dynamic-form-field.component.html +++ b/dmp-frontend/src/app/form/dynamic-fields/dynamic-form-field.component.html @@ -11,7 +11,7 @@
- + {{'GENERAL.VALIDATION.REQUIRED' | translate}}
@@ -33,7 +33,7 @@
- + diff --git a/dmp-frontend/src/app/shared/components/autocomplete/autocomplete.component.ts b/dmp-frontend/src/app/shared/components/autocomplete/autocomplete.component.ts index fe4b42617..77bd66a04 100644 --- a/dmp-frontend/src/app/shared/components/autocomplete/autocomplete.component.ts +++ b/dmp-frontend/src/app/shared/components/autocomplete/autocomplete.component.ts @@ -67,19 +67,26 @@ export class AutocompleteComponent implements OnInit { const valueChanges = this.control.valueChanges.share(); valueChanges.subscribe(searchTerm => { - this.loading = true; if (this.hasSelectedItem) { this.resetFormControlValue(); + }else{ + this.loading = true; } }); valueChanges .debounceTime(this.delay) - .finally(() => this.loading = false) .distinctUntilChanged() .switchMap(val => { - //if (this.hasSelectedItem) return []; + if (this.hasSelectedItem) { + this.loading = false; + return []; + } + this.configuration.requestItem.criteria.like = this.control.value; - return this.configuration.callback(this.configuration.requestItem).map(result=>this.filteredItems = (result)) + return this.configuration.callback(this.configuration.requestItem).map(result => { + this.filteredItems = (result) + this.loading = false; + }) }).subscribe() // this.filteredItems = this.inputField.nativeElement.valueChanges.startWith(null)