From 84d93af3ecc7d14f4014a417eb286b2ff3f3861f Mon Sep 17 00:00:00 2001 From: Alexander Brown Date: Mon, 8 Sep 2025 12:05:49 -0700 Subject: [PATCH] lint: Fix missing defaults for Props with Defaults (#5439) --- .../widgets/components/form/FormSelectButton.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/extensions/vueNodes/widgets/components/form/FormSelectButton.vue b/src/renderer/extensions/vueNodes/widgets/components/form/FormSelectButton.vue index 41e5f6efa..9b41b204a 100644 --- a/src/renderer/extensions/vueNodes/widgets/components/form/FormSelectButton.vue +++ b/src/renderer/extensions/vueNodes/widgets/components/form/FormSelectButton.vue @@ -57,7 +57,9 @@ interface Emits { } const props = withDefaults(defineProps(), { - disabled: false + disabled: false, + optionLabel: 'label', + optionValue: 'value' }) const emit = defineEmits() @@ -65,8 +67,7 @@ const emit = defineEmits() // handle both string/number arrays and object arrays with PrimeVue compatibility const getOptionValue = (option: T, index: number): string => { if (typeof option === 'object' && option !== null) { - // Use PrimeVue optionValue prop if provided, otherwise fallback to common fields - const valueField = props.optionValue ?? 'value' + const valueField = props.optionValue const value = (option as any)[valueField] ?? (option as any).value ?? @@ -81,8 +82,7 @@ const getOptionValue = (option: T, index: number): string => { // for display with PrimeVue compatibility const getOptionLabel = (option: T): string => { if (typeof option === 'object' && option !== null) { - // Use PrimeVue optionLabel prop if provided, otherwise fallback to common fields - const labelField = props.optionLabel ?? 'label' + const labelField = props.optionLabel return ( (option as any)[labelField] ?? (option as any).label ??