Merge pull request #3925 from losadaem/select-with-disable-clearable

select: don't allow to clear the selected option when disabled (fix #3924)
This commit is contained in:
Aresn 2018-08-09 16:51:57 +08:00 committed by GitHub
commit 19b6c005b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -328,7 +328,7 @@
},
canBeCleared(){
const uiStateMatch = this.hasMouseHoverHead || this.active;
const qualifiesForClear = !this.multiple && this.clearable;
const qualifiesForClear = !this.multiple && !this.disabled && this.clearable;
return uiStateMatch && qualifiesForClear && this.reset; // we return a function
},
selectOptions() {