2517-clientBalanceCompensaciones #506

Merged
carlosjr merged 49 commits from 2517-clientBalanceCompensaciones into dev 2021-02-01 11:13:57 +00:00
1 changed files with 9 additions and 3 deletions
Showing only changes of commit 54a2ea31fa - Show all commits

View File

@ -20,7 +20,7 @@ export default class Autocomplete extends Field {
constructor($element, $, $compile, $transclude) {
super($element, $, $compile);
this.$transclude = $transclude;
this.$compile = $compile;
this._selection = null;
this.input = this.element.querySelector('input');
}
@ -185,8 +185,14 @@ export default class Autocomplete extends Field {
} else {
display = this._selection[this.showField];
if (hasTemplate) {
let template = this.$transclude(() => {}, null, 'tplItem').text();
display = this.$interpolate(template)(this._selection);
let template = this.$transclude(() => {}, null, 'tplItem');
const element = template[0];
const description = element.querySelector('.text-secondary');
if (description) description.remove();
const displayElement = angular.element(element);
const displayText = displayElement.text();
display = this.$interpolate(displayText)(this._selection);
}
}
}