From 1d92e8422758d655ad4bee5cfa81ea6a70cdf63b Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 7 Jan 2025 09:51:36 +0100 Subject: [PATCH 1/4] fix: claimList order --- src/pages/Claim/ClaimList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue index 6b9fa77a0..9907cad9b 100644 --- a/src/pages/Claim/ClaimList.vue +++ b/src/pages/Claim/ClaimList.vue @@ -131,7 +131,7 @@ const STATE_COLOR = { Date: Tue, 7 Jan 2025 10:00:29 +0100 Subject: [PATCH 2/4] fix: refs #7936 disable option caption in EditTableCellValueForm --- src/components/EditTableCellValueForm.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/EditTableCellValueForm.vue b/src/components/EditTableCellValueForm.vue index 172866191..7d333ecb8 100644 --- a/src/components/EditTableCellValueForm.vue +++ b/src/components/EditTableCellValueForm.vue @@ -84,6 +84,7 @@ const closeForm = () => { :options="fieldsOptions" hide-selected option-label="label" + :option-caption="false" v-model="selectedField" data-cy="field-to-edit" /> From 59c755329a07e9091eb7c71cb02642e4e16a410c Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 7 Jan 2025 10:29:37 +0100 Subject: [PATCH 3/4] fix: refs #7936 update VnSelect to conditionally render option caption --- src/components/EditTableCellValueForm.vue | 1 - src/components/common/VnSelect.vue | 20 ++++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/components/EditTableCellValueForm.vue b/src/components/EditTableCellValueForm.vue index 7d333ecb8..172866191 100644 --- a/src/components/EditTableCellValueForm.vue +++ b/src/components/EditTableCellValueForm.vue @@ -84,7 +84,6 @@ const closeForm = () => { :options="fieldsOptions" hide-selected option-label="label" - :option-caption="false" v-model="selectedField" data-cy="field-to-edit" /> diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 58b7667d2..b78c99b8a 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -113,8 +113,15 @@ const $props = defineProps({ }); const mixinRules = [requiredFieldRule, ...($attrs.rules ?? [])]; -const { optionLabel, optionValue, optionFilter, optionFilterValue, options, modelValue } = - toRefs($props); +const { + optionLabel, + optionValue, + optionCaption, + optionFilter, + optionFilterValue, + options, + modelValue, +} = toRefs($props); const myOptions = ref([]); const myOptionsOriginal = ref([]); const vnSelectRef = ref(); @@ -321,6 +328,11 @@ function handleKeyDown(event) { } } } + +function getCaption(opt) { + if (optionCaption.value === false) return; + return opt[optionCaption.value] || opt[optionValue.value]; +}