Check for selected label before reassignment

This commit is contained in:
Sergio Crisostomo 2018-04-14 09:22:57 +02:00
parent b6c069ca9d
commit 9ca6671c71

View file

@ -589,7 +589,7 @@
const [selectedOption] = this.values; const [selectedOption] = this.values;
if (selectedOption && this.filterable && !this.multiple && !focused){ if (selectedOption && this.filterable && !this.multiple && !focused){
const selectedLabel = selectedOption.label || selectedOption.value; const selectedLabel = selectedOption.label || selectedOption.value;
if (this.query !== selectedLabel) { if (selectedLabel && this.query !== selectedLabel) {
this.preventRemoteCall = true; this.preventRemoteCall = true;
this.query = selectedLabel; this.query = selectedLabel;
} }