mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
fix(InputMenu/SelectMenu): support arbitrary value (#3779)
This commit is contained in:
@@ -186,6 +186,12 @@ describe('InputMenu', () => {
|
||||
valueKey: 'value'
|
||||
})).toEqualTypeOf<[number[]]>()
|
||||
|
||||
// with object item and object valueKey
|
||||
expectEmitPayloadType('update:modelValue', () => InputMenu({
|
||||
items: [{ label: 'foo', value: { id: 1, name: 'bar' } }],
|
||||
valueKey: 'value'
|
||||
})).toEqualTypeOf<[{ id: number, name: string }]>()
|
||||
|
||||
// with string item
|
||||
expectEmitPayloadType('update:modelValue', () => InputMenu({
|
||||
items: ['foo']
|
||||
|
||||
Reference in New Issue
Block a user