feat(InputMenu/RadioGroup/Select/SelectMenu): handle labelKey and use get to support dot notation

This commit is contained in:
Benjamin Canac
2024-10-11 14:21:03 +02:00
parent 296ae456c9
commit f6f9823b15
12 changed files with 436 additions and 21 deletions

View File

@@ -12,18 +12,23 @@ describe('InputMenu', () => {
const items = [{
label: 'Backlog',
value: 'backlog',
icon: 'i-heroicons-question-mark-circle'
}, {
label: 'Todo',
value: 'todo',
icon: 'i-heroicons-plus-circle'
}, {
label: 'In Progress',
value: 'in_progress',
icon: 'i-heroicons-arrow-up-circle'
}, {
label: 'Done',
value: 'done',
icon: 'i-heroicons-check-circle'
}, {
label: 'Canceled',
value: 'canceled',
icon: 'i-heroicons-x-circle'
}]
@@ -34,6 +39,8 @@ describe('InputMenu', () => {
['with items', { props }],
['with modelValue', { props: { ...props, modelValue: items[0] } }],
['with defaultValue', { props: { ...props, defaultValue: items[0] } }],
['with valueKey', { props: { ...props, valueKey: 'value' } }],
['with labelKey', { props: { ...props, labelKey: 'value' } }],
['with id', { props: { ...props, id: 'id' } }],
['with name', { props: { ...props, name: 'name' } }],
['with placeholder', { props: { ...props, placeholder: 'Search...' } }],