fix(select): don't allow to clear the selected option when disabled

close #3924
This commit is contained in:
Emilio Losada 2018-06-19 23:23:38 -04:00
parent 83cc2fd235
commit 9050e61c29

View file

@ -324,7 +324,7 @@
}, },
canBeCleared(){ canBeCleared(){
const uiStateMatch = this.hasMouseHoverHead || this.active; 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 return uiStateMatch && qualifiesForClear && this.reset; // we return a function
}, },
selectOptions() { selectOptions() {