feat(filter): add unique id to filter input

This commit is contained in:
kolaente 2024-03-18 12:13:29 +01:00
parent b8ff7910b0
commit 6e53bf4ebe
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 1 deletions

View File

@ -22,6 +22,7 @@ import {
} from '@/helpers/filters'
import {useDebounceFn} from '@vueuse/core'
import {useI18n} from 'vue-i18n'
import {createRandomID} from '@/helpers/randomId'
const {t} = useI18n()
@ -43,6 +44,8 @@ const {
height,
} = useAutoHeightTextarea(filterQuery)
const id = ref(createRandomID())
watch(
() => modelValue,
() => {
@ -253,6 +256,7 @@ const blurDebounced = useDebounceFn(() => emit('blur'), 500)
<div class="field">
<label
class="label"
:for="id"
>
{{ inputLabel ?? $t('filters.query.title') }}
</label>
@ -268,8 +272,8 @@ const blurDebounced = useDebounceFn(() => emit('blur'), 500)
<textarea
ref="filterInput"
v-model="filterQuery"
:id
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellcheck="false"