Skip to content

Commit

Permalink
Revert "Select: set value to null when cleared (#14322) (#14650)"
Browse files Browse the repository at this point in the history
This reverts commit 6a76609.
  • Loading branch information
iamkun authored May 8, 2019
1 parent b240f0e commit d8ca3e3
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 d8ca3e3

Please sign in to comment.