Skip to content

Commit

Permalink
Select: set value to null when cleared (#14322) (#14650)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronfulkerson authored and wacky6 committed Mar 28, 2019
1 parent c698bbb commit 6a76609
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 @@ -742,7 +742,7 @@
deleteSelected(event) {
event.stopPropagation();
const value = this.multiple ? [] : '';
const value = this.multiple ? [] : null;
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('');
expect(vm.value).to.equal(null);
done();
}, 100);
});
Expand Down

0 comments on commit 6a76609

Please sign in to comment.