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
|
this.isFocused = true; // so we put back focus after clicking with mouse on option elements
|
||||||
} else {
|
} else {
|
||||||
this.query = String(option.label).trim();
|
this.query = '';
|
||||||
this.values = [option];
|
this.values = [option];
|
||||||
this.lastRemoteQuery = '';
|
this.lastRemoteQuery = '';
|
||||||
this.query = '';
|
|
||||||
this.hideMenu();
|
this.hideMenu();
|
||||||
}
|
}
|
||||||
if (this.filterable){
|
if (this.filterable){
|
||||||
|
@ -718,9 +717,10 @@
|
||||||
value(value){
|
value(value){
|
||||||
const {getInitialValue, getOptionData, publicValue, values} = this;
|
const {getInitialValue, getOptionData, publicValue, values} = this;
|
||||||
this.checkUpdateStatus();
|
this.checkUpdateStatus();
|
||||||
|
const vModelValue = (publicValue && this.labelInValue) ?
|
||||||
|
(this.multiple ? publicValue.map(({value}) => value) : publicValue.value) : publicValue;
|
||||||
if (value === '') this.values = [];
|
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));
|
this.$nextTick(() => this.values = getInitialValue().map(getOptionData).filter(Boolean));
|
||||||
if (!this.multiple) this.dispatch('FormItem', 'on-form-change', this.publicValue);
|
if (!this.multiple) this.dispatch('FormItem', 'on-form-change', this.publicValue);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue