diff --git a/src/components/dropdown/Dropdown.vue b/src/components/dropdown/Dropdown.vue index 62978ea09..f5992f609 100644 --- a/src/components/dropdown/Dropdown.vue +++ b/src/components/dropdown/Dropdown.vue @@ -84,7 +84,7 @@ export default { }, methods: { getOptionLabel(option) { - return ObjectUtils.resolveFieldData(option, this.optionLabel); + return this.optionLabel ? ObjectUtils.resolveFieldData(option, this.optionLabel) : option; }, getOptionValue(option) { return this.optionValue ? ObjectUtils.resolveFieldData(option, this.optionValue) : option; diff --git a/src/components/listbox/Listbox.vue b/src/components/listbox/Listbox.vue index 37449144e..ecdcfa0c7 100644 --- a/src/components/listbox/Listbox.vue +++ b/src/components/listbox/Listbox.vue @@ -45,7 +45,7 @@ export default { }, methods: { getOptionLabel(option) { - return ObjectUtils.resolveFieldData(option, this.optionLabel); + return this.optionLabel ? ObjectUtils.resolveFieldData(option, this.optionLabel) : option; }, getOptionValue(option) { return this.optionValue ? ObjectUtils.resolveFieldData(option, this.optionValue) : option; diff --git a/src/components/selectbutton/SelectButton.vue b/src/components/selectbutton/SelectButton.vue index 196ebfcef..8ce391a55 100644 --- a/src/components/selectbutton/SelectButton.vue +++ b/src/components/selectbutton/SelectButton.vue @@ -33,7 +33,7 @@ export default { }, methods: { getOptionLabel(option) { - return ObjectUtils.resolveFieldData(option, this.optionLabel); + return this.optionLabel ? ObjectUtils.resolveFieldData(option, this.optionLabel) : option; }, getOptionValue(option) { return this.optionValue ? ObjectUtils.resolveFieldData(option, this.optionValue) : option;