mirror of https://github.com/ElemeFE/element
Select: not clear text when filtering (#12304)
parent
4af2d8761d
commit
6f08e941aa
|
@ -86,8 +86,14 @@
|
||||||
currentLabel() {
|
currentLabel() {
|
||||||
if (!this.created && !this.select.remote) this.dispatch('ElSelect', 'setSelected');
|
if (!this.created && !this.select.remote) this.dispatch('ElSelect', 'setSelected');
|
||||||
},
|
},
|
||||||
value() {
|
value(val, oldVal) {
|
||||||
if (!this.created && !this.select.remote) this.dispatch('ElSelect', 'setSelected');
|
const { remote, valueKey } = this.select;
|
||||||
|
if (!this.created && !remote) {
|
||||||
|
if (valueKey && typeof val === 'object' && typeof oldVal === 'object' && val[valueKey] === oldVal[valueKey]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.dispatch('ElSelect', 'setSelected');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue