Password: Incorrect onClick property as scope for custom icons #3900
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
You added support for custom icons in Primevue 3.27.0 which is really appreciated!
There is a bug using custom icons for the Password component. The
onClick
function sent asscope
property is defined like this:But it should be defined like this:
Right now, we have to call the function twice to make this work. Ex.
Reproducer
https://codesandbox.io/s/billowing-worker-187lxo
PrimeVue version
3.27.0
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
Version 1.50.114 Chromium: 112.0.5615.49 (Build officiel) (64 bits)
Steps to reproduce the behavior
onClick
eventExpected behavior
The
onClick
event sent as scope should be define as:onClick="onMaskToggle"
inlib/password/Password.vue
instead of:onClick="() => onMaskToggle"
. Right now, to make it works, we need to call it twice like@click="onClick()()"
which is not desirable.The text was updated successfully, but these errors were encountered: