add label prop

This commit is contained in:
Adrian Zürcher
2026-02-12 12:09:55 +01:00
parent 031b4d84ec
commit 095d6411ba

View File

@@ -1,6 +1,7 @@
<template> <template>
<q-select <q-select
ref="selectRef" ref="selectRef"
:label="props.label || ''"
v-model="modelValueLocal" v-model="modelValueLocal"
:options="filteredOptions" :options="filteredOptions"
:option-label="optionLabel" :option-label="optionLabel"
@@ -43,6 +44,9 @@ const props = defineProps({
type: Array as PropType<T[]>, type: Array as PropType<T[]>,
required: true, required: true,
}, },
label: {
type: String,
},
optionLabel: { optionLabel: {
type: [Function, String] as PropType<((option: T) => string) | string | undefined>, type: [Function, String] as PropType<((option: T) => string) | string | undefined>,
required: true, required: true,