Преглед изворни кода

Option: Fix #3728 bug

Select component with remote search clears what you typed when the value for each el-option is an object
Semen Levenson пре 8 година
родитељ
комит
b9e3e7faef
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      packages/select/src/option.vue

+ 2 - 2
packages/select/src/option.vue

@@ -84,10 +84,10 @@
 
     watch: {
       currentLabel() {
-        if (!this.created) this.dispatch('ElSelect', 'setSelected');
+        if (!this.created && !this.parent.remote) this.dispatch('ElSelect', 'setSelected');
       },
       value() {
-        if (!this.created) this.dispatch('ElSelect', 'setSelected');
+        if (!this.created && !this.parent.remote) this.dispatch('ElSelect', 'setSelected');
       }
     },