bug fixing

This commit is contained in:
lotte
2019-02-25 09:57:46 +01:00
parent 3c104a460b
commit 35be122eea
13 changed files with 93 additions and 80 deletions

View File

@@ -85,11 +85,6 @@ export class InputSuggestionsComponent implements ControlValueAccessor, OnChange
*/
@Output() findSuggestions = new EventEmitter();
/**
* Emits event when the input field loses focus
*/
@Output() blur = new EventEmitter();
/**
* Emits true when the list of suggestions should be shown
*/
@@ -119,9 +114,14 @@ export class InputSuggestionsComponent implements ControlValueAccessor, OnChange
*/
_value: string;
/** Fields needed to add ngModel */
@Input() disabled = false;
propagateChange = (_: any) => {
/* Empty implementation */
};
propagateTouch = (_: any) => {
/* Empty implementation */
};
/**
* When any of the inputs change, check if we should still show the suggestions
@@ -214,9 +214,9 @@ export class InputSuggestionsComponent implements ControlValueAccessor, OnChange
find(data) {
if (!this.blockReopen) {
this.findSuggestions.emit(data);
this.typeSuggestion.emit(data);
}
this.blockReopen = false;
this.typeSuggestion.emit(data);
}
onSubmit(data) {
@@ -230,11 +230,11 @@ export class InputSuggestionsComponent implements ControlValueAccessor, OnChange
}
registerOnTouched(fn: any): void {
/* no implementation */
this.propagateTouch = fn;
}
setDisabledState(isDisabled: boolean): void {
/* no implementation */
this.disabled = isDisabled;
}
writeValue(value: any): void {