Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NcTimezonePicker): Allow to set ID of inner select component #4734

Merged
merged 1 commit into from Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 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 All @@ -58,6 +59,7 @@ import {
getSortedTimezoneList,
} from './timezone.js'
import getTimezoneManager from './timezoneDataProviderService.js'
import GenRandomId from '../../utils/GenRandomId.js'
import NcSelect from '../NcSelect/index.js'
import { t } from '../../l10n.js'

Expand All @@ -81,6 +83,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-${GenRandomId(5)}`,
},
},
emits: ['input'],
computed: {
Expand Down