Skip to content

Commit

Permalink
Refactor #4953 - For Password
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Feb 2, 2024
1 parent dcf5781 commit 2b1b235
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion components/lib/password/Password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,26 @@ export default {
emits: ['update:modelValue', 'change', 'focus', 'blur', 'invalid'],
data() {
return {
id: this.$attrs.id,
overlayVisible: false,
meter: null,
infoText: null,
focused: false,
unmasked: false
};
},
watch: {
'$attrs.id': function (newValue) {
this.id = newValue || UniqueComponentId();
}
},
mediumCheckRegExp: null,
strongCheckRegExp: null,
resizeListener: null,
scrollHandler: null,
overlay: null,
mounted() {
this.id = this.id || UniqueComponentId();
this.infoText = this.promptText;
this.mediumCheckRegExp = new RegExp(this.mediumRegex);
this.strongCheckRegExp = new RegExp(this.strongRegex);
Expand Down Expand Up @@ -291,7 +298,7 @@ export default {
return this.promptLabel || this.$primevue.config.locale.passwordPrompt;
},
panelUniqueId() {
return UniqueComponentId() + '_panel';
return this.id + '_panel';
}
},
components: {
Expand Down

0 comments on commit 2b1b235

Please sign in to comment.