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
|
@ -103,11 +103,20 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
id: this.menuId,
|
||||
currentIndex: -3,
|
||||
focused: false,
|
||||
focusedOptionIndex: -1
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
menuId(newValue) {
|
||||
this.id = newValue || UniqueComponentId();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.id = this.id || UniqueComponentId();
|
||||
},
|
||||
methods: {
|
||||
getItemId(index) {
|
||||
return `${this.id}_${index}`;
|
||||
|
@ -263,9 +272,6 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
id() {
|
||||
return this.menuId || UniqueComponentId();
|
||||
},
|
||||
focusedOptionId() {
|
||||
return this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue