Skip to content

Commit d9ba5d6

Browse files
committed
fix(files_sharing): make sure IDs are unique for HTML elements
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 938289c commit d9ba5d6

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

apps/files_sharing/src/components/SharingInput.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
<template>
77
<div class="sharing-search">
8-
<label class="hidden-visually" for="sharing-search-input">
8+
<label class="hidden-visually" :for="shareInputId">
99
{{ isExternal ? t('files_sharing', 'Enter external recipients')
1010
: t('files_sharing', 'Search for internal recipients') }}
1111
</label>
1212
<NcSelect ref="select"
1313
v-model="value"
14-
input-id="sharing-search-input"
14+
:input-id="shareInputId"
1515
class="sharing-search__input"
1616
:disabled="!canReshare"
1717
:loading="loading"
@@ -87,6 +87,12 @@ export default {
8787
},
8888
},
8989
90+
setup() {
91+
return {
92+
shareInputId: `share-input-${Math.random().toString(36).slice(2, 7)}`,
93+
}
94+
},
95+
9096
data() {
9197
return {
9298
config: new Config(),

0 commit comments

Comments
 (0)