From d60c2d15e8c9062af0f2e18ecaa9c39129122db3 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Tue, 2 Aug 2022 09:48:41 +0100 Subject: [PATCH] Cosmetics --- src/components/autocomplete/AutoComplete.vue | 6 +++--- src/components/dropdown/Dropdown.vue | 6 +++--- src/components/listbox/Listbox.vue | 6 +++--- src/components/multiselect/MultiSelect.vue | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/autocomplete/AutoComplete.vue b/src/components/autocomplete/AutoComplete.vue index 9a8239c88..45803f8a9 100755 --- a/src/components/autocomplete/AutoComplete.vue +++ b/src/components/autocomplete/AutoComplete.vue @@ -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); }, diff --git a/src/components/dropdown/Dropdown.vue b/src/components/dropdown/Dropdown.vue index a08297bd7..11b647d99 100755 --- a/src/components/dropdown/Dropdown.vue +++ b/src/components/dropdown/Dropdown.vue @@ -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)); }, diff --git a/src/components/listbox/Listbox.vue b/src/components/listbox/Listbox.vue index 68bf1474e..fb491abd1 100755 --- a/src/components/listbox/Listbox.vue +++ b/src/components/listbox/Listbox.vue @@ -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)); }, diff --git a/src/components/multiselect/MultiSelect.vue b/src/components/multiselect/MultiSelect.vue index ffafad12a..6063c3ab1 100755 --- a/src/components/multiselect/MultiSelect.vue +++ b/src/components/multiselect/MultiSelect.vue @@ -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)); },