From d9822db6e8befacb836ea77cc0c5459b50e8c070 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Fri, 8 Nov 2024 10:27:05 +0100 Subject: [PATCH] chore(InputMenu/Select/SelectMenu): consistent types --- src/runtime/components/InputMenu.vue | 4 ++-- src/runtime/components/Select.vue | 2 +- src/runtime/components/SelectMenu.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/components/InputMenu.vue b/src/runtime/components/InputMenu.vue index e6c87e8c..fded4b3a 100644 --- a/src/runtime/components/InputMenu.vue +++ b/src/runtime/components/InputMenu.vue @@ -92,7 +92,7 @@ export interface InputMenuProps, I extends Ma * When `items` is an array of objects, select the field to use as the label. * @defaultValue 'label' */ - labelKey?: keyof T + labelKey?: V items?: I /** Highlight the ring color like a focus state. */ highlight?: boolean @@ -149,7 +149,7 @@ const props = withDefaults(defineProps>(), { autofocusDelay: 0, portal: true, filter: () => ['label'], - labelKey: 'label' as keyof T + labelKey: 'label' as never }) const emits = defineEmits>() const slots = defineSlots>() diff --git a/src/runtime/components/Select.vue b/src/runtime/components/Select.vue index 0289733d..e0a3fa0f 100644 --- a/src/runtime/components/Select.vue +++ b/src/runtime/components/Select.vue @@ -70,7 +70,7 @@ export interface SelectProps, I extends Maybe * When `items` is an array of objects, select the field to use as the label. * @defaultValue 'label' */ - labelKey?: SelectItemKey + labelKey?: V items?: I /** Highlight the ring color like a focus state. */ highlight?: boolean diff --git a/src/runtime/components/SelectMenu.vue b/src/runtime/components/SelectMenu.vue index 44cd00c1..98da67d9 100644 --- a/src/runtime/components/SelectMenu.vue +++ b/src/runtime/components/SelectMenu.vue @@ -83,7 +83,7 @@ export interface SelectMenuProps, I extends M * When `items` is an array of objects, select the field to use as the label. * @defaultValue 'label' */ - labelKey?: SelectItemKey + labelKey?: V items?: I /** Highlight the ring color like a focus state. */ highlight?: boolean