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
|
@ -84,12 +84,18 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
id: this.$attrs.id,
|
||||
overlayVisible: false,
|
||||
focused: false,
|
||||
focusedOptionIndex: -1,
|
||||
selectedOptionIndex: -1
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$attrs.id': function (newValue) {
|
||||
this.id = newValue || UniqueComponentId();
|
||||
}
|
||||
},
|
||||
target: null,
|
||||
outsideClickListener: null,
|
||||
scrollHandler: null,
|
||||
|
@ -97,6 +103,8 @@ export default {
|
|||
container: null,
|
||||
list: null,
|
||||
mounted() {
|
||||
this.id = this.id || UniqueComponentId();
|
||||
|
||||
if (!this.popup) {
|
||||
this.bindResizeListener();
|
||||
this.bindOutsideClickListener();
|
||||
|
@ -389,9 +397,6 @@ export default {
|
|||
}
|
||||
];
|
||||
},
|
||||
id() {
|
||||
return this.$attrs.id || UniqueComponentId();
|
||||
},
|
||||
focusedOptionId() {
|
||||
return this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue