Skip to content

Commit

Permalink
Merge pull request #4606 from nextcloud-libraries/fix/nc-select-dupli…
Browse files Browse the repository at this point in the history
…cated-uid

fix(NcSelect): make id truly uniqual
  • Loading branch information
susnux committed Oct 4, 2023
2 parents cee9582 + bbafa89 commit 628aaab
Showing 1 changed file with 12 additions and 0 deletions.
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

0 comments on commit 628aaab

Please sign in to comment.