refactor of autocomplete

This commit is contained in:
Gerard 2018-04-18 14:44:07 +02:00
parent 25d099513d
commit bb0e6dd994
2 changed files with 7 additions and 3 deletions

View File

@ -125,8 +125,12 @@ export default class Autocomplete extends Input {
this.selection = data; this.selection = data;
else else
this.selection = data[0]; this.selection = data[0];
} else } else {
this.selection = null; let selection = {};
selection[this.showField] = this._field;
selection[this.valueField] = this._field;
this.selection = selection;
}
} }
refreshDisplayed() { refreshDisplayed() {

View File

@ -5,7 +5,7 @@ vn-autocomplete > div > .mdl-textfield {
& > input { & > input {
cursor: pointer; cursor: pointer;
height: 26px; height: 30px;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;