mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +00:00
Fixed #3558 - Unique values created in components are set incorrectly.
This commit is contained in:
parent
86a34cde87
commit
2da56f7ed9
18 changed files with 120 additions and 52 deletions
|
@ -89,6 +89,7 @@ export default {
|
|||
list: null,
|
||||
data() {
|
||||
return {
|
||||
id: this.$attrs.id,
|
||||
focused: false,
|
||||
focusedItemInfo: { index: -1, level: 0, parentKey: '' },
|
||||
activeItemPath: [],
|
||||
|
@ -97,6 +98,9 @@ export default {
|
|||
};
|
||||
},
|
||||
watch: {
|
||||
'$attrs.id': function (newValue) {
|
||||
this.id = newValue || UniqueComponentId();
|
||||
},
|
||||
activeItemPath(newPath) {
|
||||
if (ObjectUtils.isNotEmpty(newPath)) {
|
||||
this.bindOutsideClickListener();
|
||||
|
@ -122,6 +126,8 @@ export default {
|
|||
this.container = null;
|
||||
},
|
||||
mounted() {
|
||||
this.id = this.id || UniqueComponentId();
|
||||
|
||||
if (this.global) {
|
||||
this.bindDocumentContextMenuListener();
|
||||
}
|
||||
|
@ -611,9 +617,6 @@ export default {
|
|||
|
||||
return processedItem ? processedItem.items : this.processedItems;
|
||||
},
|
||||
id() {
|
||||
return this.$attrs.id || UniqueComponentId();
|
||||
},
|
||||
focusedItemId() {
|
||||
return this.focusedItemInfo.index !== -1 ? `${this.id}${ObjectUtils.isNotEmpty(this.focusedItemInfo.parentKey) ? '_' + this.focusedItemInfo.parentKey : ''}_${this.focusedItemInfo.index}` : null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue