mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 09:22: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
|
@ -185,17 +185,23 @@ export default {
|
|||
focusOnHover: false,
|
||||
data() {
|
||||
return {
|
||||
id: this.$attrs.id,
|
||||
filterValue: null,
|
||||
focused: false,
|
||||
focusedOptionIndex: -1
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$attrs.id': function (newValue) {
|
||||
this.id = newValue || UniqueComponentId();
|
||||
},
|
||||
options() {
|
||||
this.autoUpdateModel();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.id = this.id || UniqueComponentId();
|
||||
|
||||
this.autoUpdateModel();
|
||||
},
|
||||
methods: {
|
||||
|
@ -733,9 +739,6 @@ export default {
|
|||
selectedMessageText() {
|
||||
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText;
|
||||
},
|
||||
id() {
|
||||
return this.$attrs.id || UniqueComponentId();
|
||||
},
|
||||
focusedOptionId() {
|
||||
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue