Browse Source

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 years ago
parent
commit
b9e3e7faef
1 changed files with 2 additions and 2 deletions
  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');
       }
     },