I'm currently working on a complex piece of code that has me feeling lost. I am utilizing TypeScript with Vue (Vuetify), but I am still relatively new to TypeScript.
My challenge involves an array of objects that I need to load as items into a Vuetify combobox component.
Array =[
{
subject: 'science',
difficulty: 'medium'
}
{
subject: 'math',
difficulty: 'hard'
}]
The goal is to display the subject in the dropdown list, while having the difficulty as the hidden value behind each combobox item.
I understand that it should look something like this:
items: [
{ text: 'science', value: 'medium' },
{ text: 'math', value: 'hard' }];
Then, I can utilize it within the V-Combobox component like so:
<v-combobox :items="items" />
If anyone knows how to achieve this, your help would be greatly appreciated!