So I want to this call
<ValidWordList
:items="answer.WordList"
:labelText="answer.WordList.length + ' Words'"
/></template>
to return the select string from the items array to run this function after a string is selected
function select(word: string) {
console.log(word)
answer.value = word
}
and here is the component
<template>
<v-select :items="items" return string :label="labelText" ></v-select>
</template>
<script setup lang="ts">
export interface Props {
items?: string[]
labelText: string
}
const props = defineProps({
items: {
type: Array,
default: ''
},
labelText: {
type: String,
default: ' Words'
}
})
</script>
Honestly, I’m not sure what to do and how to make it work and I tried to add @input and @change and emit it back but nothing seem to work