Fixed #4681 - Add empty option check to some components
parent
0d1beb2f1c
commit
f959976b70
|
@ -765,7 +765,7 @@ export default {
|
|||
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.searchLocale) === value.toLocaleLowerCase(this.searchLocale);
|
||||
},
|
||||
isValidOption(option) {
|
||||
return option && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
||||
return ObjectUtils.isNotEmpty(option) && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
||||
},
|
||||
isValidSelectedOption(option) {
|
||||
return this.isValidOption(option) && this.isSelected(option);
|
||||
|
|
|
@ -528,7 +528,7 @@ export default {
|
|||
return this.isValidOption(processedOption) && this.getProccessedOptionLabel(processedOption).toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale));
|
||||
},
|
||||
isValidOption(processedOption) {
|
||||
return !!processedOption && !this.isOptionDisabled(processedOption.option);
|
||||
return ObjectUtils.isNotEmpty(processedOption) && !this.isOptionDisabled(processedOption.option);
|
||||
},
|
||||
isValidSelectedOption(processedOption) {
|
||||
return this.isValidOption(processedOption) && this.isSelected(processedOption);
|
||||
|
|
|
@ -711,7 +711,7 @@ export default {
|
|||
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
|
||||
},
|
||||
isValidOption(option) {
|
||||
return option && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
||||
return ObjectUtils.isNotEmpty(option) && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
||||
},
|
||||
isValidSelectedOption(option) {
|
||||
return this.isValidOption(option) && this.isSelected(option);
|
||||
|
|
|
@ -511,7 +511,7 @@ export default {
|
|||
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
|
||||
},
|
||||
isValidOption(option) {
|
||||
return option && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
||||
return ObjectUtils.isNotEmpty(option) && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
||||
},
|
||||
isValidSelectedOption(option) {
|
||||
return this.isValidOption(option) && this.isSelected(option);
|
||||
|
|
|
@ -804,7 +804,7 @@ export default {
|
|||
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
|
||||
},
|
||||
isValidOption(option) {
|
||||
return option && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
||||
return ObjectUtils.isNotEmpty(option) && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
||||
},
|
||||
isValidSelectedOption(option) {
|
||||
return this.isValidOption(option) && this.isSelected(option);
|
||||
|
|
Loading…
Reference in New Issue