Skip to content

Commit

Permalink
fix(NcTimezonePicker): Allow to set ID of inner select element to be …
Browse files Browse the repository at this point in the history
…able to reference it for labels

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Nov 1, 2023
1 parent 99a53d2 commit 9678f3c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/NcTimezonePicker/NcTimezonePicker.vue
Expand Up @@ -41,7 +41,8 @@ export default {
</docs>

<template>
<NcSelect :value="selectedTimezone"
<NcSelect :uid="uid"
:value="selectedTimezone"
:options="options"
:multiple="false"
:clearable="false"
Expand Down Expand Up @@ -81,6 +82,13 @@ export default {
type: String,
default: 'floating',
},
/**
* ID of the inner vue-select element, can be used for labels like: `vs-${uid}__combobox`
*/
uid: {
type: [String, Number],
default: `tz-${(Math.random() + 1).toString(36).substring(7)}`,
},
},
emits: ['input'],
computed: {
Expand Down

0 comments on commit 9678f3c

Please sign in to comment.