Skip to content

Commit

Permalink
Revert "Select: set value to null when cleared (ElemeFE#14322) (Eleme…
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkun authored and Feng committed Jun 20, 2019
1 parent d30182f commit 6ded218
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/select/src/select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@
deleteSelected(event) {
event.stopPropagation();
const value = this.multiple ? [] : null;
const value = this.multiple ? [] : '';
this.$emit('input', value);
this.emitChange(value);
this.visible = false;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/specs/select.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ describe('Select', () => {
const iconClear = vm.$el.querySelector('.el-input__icon.el-icon-circle-close');
expect(iconClear).to.exist;
iconClear.click();
expect(vm.value).to.equal(null);
expect(vm.value).to.equal('');
done();
}, 100);
});
Expand Down

0 comments on commit 6ded218

Please sign in to comment.