diff --git a/client/core/src/components/autocomplete/autocomplete.js b/client/core/src/components/autocomplete/autocomplete.js index aeb117121..3bf021139 100755 --- a/client/core/src/components/autocomplete/autocomplete.js +++ b/client/core/src/components/autocomplete/autocomplete.js @@ -168,12 +168,12 @@ export default class Autocomplete extends Input { } onSelectionRequest(data) { - if (data && data.length > 0) + if (data && data.length > 0) if (this.multiple) this.selection = data; else this.selection = data[0]; - else + else this.selection = null; } @@ -181,7 +181,7 @@ export default class Autocomplete extends Input { let display = ''; let hasTemplate = this.$transclude && this.$transclude.isSlotFilled('tplItem'); - if (this._selection && this.showField) + if (this._selection && this.showField) if (this.multiple && Array.isArray(this._selection)) { for (let item of this._selection) { if (display.length > 0) display += ', '; @@ -194,13 +194,12 @@ export default class Autocomplete extends Input { display = this.$interpolate(template)(this._selection); } } - + this.input.value = display; - if (this.translateFields) + if (this.translateFields) if (this.translateFields.indexOf(this.showField) > -1) this.input.value = this.$translate.instant(display); - this.mdlUpdate(); }