mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-28 10:50:40 +01:00
chore(InputMenu/Select/SelectMenu): consistent types
This commit is contained in:
@@ -92,7 +92,7 @@ export interface InputMenuProps<T extends MaybeArrayOfArrayItem<I>, I extends Ma
|
|||||||
* When `items` is an array of objects, select the field to use as the label.
|
* When `items` is an array of objects, select the field to use as the label.
|
||||||
* @defaultValue 'label'
|
* @defaultValue 'label'
|
||||||
*/
|
*/
|
||||||
labelKey?: keyof T
|
labelKey?: V
|
||||||
items?: I
|
items?: I
|
||||||
/** Highlight the ring color like a focus state. */
|
/** Highlight the ring color like a focus state. */
|
||||||
highlight?: boolean
|
highlight?: boolean
|
||||||
@@ -149,7 +149,7 @@ const props = withDefaults(defineProps<InputMenuProps<T, I, V, M>>(), {
|
|||||||
autofocusDelay: 0,
|
autofocusDelay: 0,
|
||||||
portal: true,
|
portal: true,
|
||||||
filter: () => ['label'],
|
filter: () => ['label'],
|
||||||
labelKey: 'label' as keyof T
|
labelKey: 'label' as never
|
||||||
})
|
})
|
||||||
const emits = defineEmits<InputMenuEmits<T, V, M>>()
|
const emits = defineEmits<InputMenuEmits<T, V, M>>()
|
||||||
const slots = defineSlots<InputMenuSlots<T>>()
|
const slots = defineSlots<InputMenuSlots<T>>()
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export interface SelectProps<T extends MaybeArrayOfArrayItem<I>, I extends Maybe
|
|||||||
* When `items` is an array of objects, select the field to use as the label.
|
* When `items` is an array of objects, select the field to use as the label.
|
||||||
* @defaultValue 'label'
|
* @defaultValue 'label'
|
||||||
*/
|
*/
|
||||||
labelKey?: SelectItemKey<T>
|
labelKey?: V
|
||||||
items?: I
|
items?: I
|
||||||
/** Highlight the ring color like a focus state. */
|
/** Highlight the ring color like a focus state. */
|
||||||
highlight?: boolean
|
highlight?: boolean
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export interface SelectMenuProps<T extends MaybeArrayOfArrayItem<I>, I extends M
|
|||||||
* When `items` is an array of objects, select the field to use as the label.
|
* When `items` is an array of objects, select the field to use as the label.
|
||||||
* @defaultValue 'label'
|
* @defaultValue 'label'
|
||||||
*/
|
*/
|
||||||
labelKey?: SelectItemKey<T>
|
labelKey?: V
|
||||||
items?: I
|
items?: I
|
||||||
/** Highlight the ring color like a focus state. */
|
/** Highlight the ring color like a focus state. */
|
||||||
highlight?: boolean
|
highlight?: boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user