fixed #5213
This commit is contained in:
parent
5f04795b70
commit
87f01c5dab
1 changed files with 4 additions and 4 deletions
|
@ -660,10 +660,9 @@
|
|||
}
|
||||
this.isFocused = true; // so we put back focus after clicking with mouse on option elements
|
||||
} else {
|
||||
this.query = String(option.label).trim();
|
||||
this.query = '';
|
||||
this.values = [option];
|
||||
this.lastRemoteQuery = '';
|
||||
this.query = '';
|
||||
this.hideMenu();
|
||||
}
|
||||
if (this.filterable){
|
||||
|
@ -718,9 +717,10 @@
|
|||
value(value){
|
||||
const {getInitialValue, getOptionData, publicValue, values} = this;
|
||||
this.checkUpdateStatus();
|
||||
|
||||
const vModelValue = (publicValue && this.labelInValue) ?
|
||||
(this.multiple ? publicValue.map(({value}) => value) : publicValue.value) : publicValue;
|
||||
if (value === '') this.values = [];
|
||||
else if (checkValuesNotEqual(value,publicValue,values)) {
|
||||
else if (checkValuesNotEqual(value,vModelValue,values)) {
|
||||
this.$nextTick(() => this.values = getInitialValue().map(getOptionData).filter(Boolean));
|
||||
if (!this.multiple) this.dispatch('FormItem', 'on-form-change', this.publicValue);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue