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(NcSelect): make id truly uniqual #4606

Merged
merged 1 commit into from Oct 4, 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
12 changes: 12 additions & 0 deletions src/components/NcSelect/NcSelect.vue
Expand Up @@ -546,6 +546,8 @@ import NcLoadingIcon from '../NcLoadingIcon/index.js'

import l10n from '../../mixins/l10n.js'

import GenRandomId from '../../utils/GenRandomId.js'

export default {
name: 'NcSelect',

Expand Down Expand Up @@ -801,6 +803,16 @@ export default {
},
},

/**
* A unique identifier used to generate IDs and DOM attributes. Must be unique for every instance of the component.
*
* @see https://vue-select.org/api/props.html#uid
*/
uid: {
type: String,
default: () => '-' + GenRandomId(),
},

/**
* When `appendToBody` is true, this sets the placement of the dropdown
*
Expand Down