bug fixed autocomplete and width dropdown

This commit is contained in:
dherrero 2017-10-05 11:04:22 +02:00
parent 5b100e502c
commit 562ffed388
2 changed files with 4 additions and 5 deletions

View File

@ -33,6 +33,10 @@ class Autocomplete extends Component {
this._preLoad = true;
this.getItems();
}
if (value && !this.width) {
let rectangle = this.$element[0].getBoundingClientRect();
this.width = Math.round(rectangle.width) - 10;
}
this._showDropDown = value;
}
@ -271,9 +275,6 @@ class Autocomplete extends Component {
this.showDropDown = this.mouseFocus;
});
});
let rectangle = this.$element[0].getBoundingClientRect();
this.width = Math.round(rectangle.width) - 10;
}
$onDestroy() {
@ -301,7 +302,6 @@ module.component('vnAutocomplete', {
itemAs: '@?',
field: '=',
label: '@',
itemTemplate: '@?',
multiple: '@?'
},
transclude: {

View File

@ -187,7 +187,6 @@ export default class Watcher extends Component {
if (response === 'ACCEPT') {
Object.assign(this.data, this.orgData);
this.$state.go(this.state);
} else {
this.state = null;
}