Cosmetics

pull/2835/head
mertsincan 2022-08-02 09:48:41 +01:00
parent 757ec20f5c
commit d60c2d15e8
4 changed files with 12 additions and 12 deletions

View File

@ -256,6 +256,9 @@ export default {
isOptionDisabled(option) {
return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
},
isOptionGroup(option) {
return this.optionGroupLabel && option.optionGroup && option.group;
},
getOptionGroupLabel(optionGroup) {
return ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel);
},
@ -702,9 +705,6 @@ export default {
isDropdownClicked(event) {
return this.$refs.dropdownButton ? (event.target === this.$refs.dropdownButton || this.$refs.dropdownButton.$el.contains(event.target)) : false;
},
isOptionGroup(option) {
return this.optionGroupLabel && option.optionGroup && option.group;
},
isOptionMatched(option, value) {
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.searchLocale) === value.toLocaleLowerCase(this.searchLocale);
},

View File

@ -243,6 +243,9 @@ export default {
isOptionDisabled(option) {
return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
},
isOptionGroup(option) {
return this.optionGroupLabel && option.optionGroup && option.group;
},
getOptionGroupLabel(optionGroup) {
return ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel);
},
@ -661,9 +664,6 @@ export default {
hasFocusableElements() {
return DomHandler.getFocusableElements(this.overlay, ':not(.p-hidden-focusable)').length > 0;
},
isOptionGroup(option) {
return this.optionGroupLabel && option.optionGroup && option.group;
},
isOptionMatched(option) {
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
},

View File

@ -171,6 +171,9 @@ export default {
isOptionDisabled(option) {
return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
},
isOptionGroup(option) {
return this.optionGroupLabel && option.optionGroup && option.group;
},
getOptionGroupLabel(optionGroup) {
return ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel);
},
@ -486,9 +489,6 @@ export default {
onShiftKey() {
this.startRangeIndex = this.focusedOptionIndex;
},
isOptionGroup(option) {
return this.optionGroupLabel && option.optionGroup && option.group;
},
isOptionMatched(option) {
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
},

View File

@ -295,6 +295,9 @@ export default {
return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
},
isOptionGroup(option) {
return this.optionGroupLabel && option.optionGroup && option.group;
},
getOptionGroupLabel(optionGroup) {
return ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel);
},
@ -776,9 +779,6 @@ export default {
hasFocusableElements() {
return DomHandler.getFocusableElements(this.overlay, ':not(.p-hidden-focusable)').length > 0;
},
isOptionGroup(option) {
return this.optionGroupLabel && option.optionGroup && option.group;
},
isOptionMatched(option) {
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
},