-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InputMask: Passed props are not set #6025
Comments
Interesting! Do you get an error on console? |
No there are no errors in the console, not on the official documentation page (https://primevue.org/inputmask/) and also not in my own application when I use the InputMask. Back in V3 a native input element was used with v-bind: Now in the V4 there is now the :pt used from the InputText component: maybe something in the passthrough logic doesn't work as expected? |
Thanks a lot! We'll fix it in the next version. |
Just want to add onto this that being able to pass the This is helpful when, for example, an input mask of a phone number is added, where we want to set |
New pt usage of InputMask:
|
@tugcekucukoglu |
That doesn't resolve the issue. Please check on your OWN documentation page the error remains even on your own page: And the rendered native input element doesn't have the id anymore. If there is now a way to pass through attributes with PT then it would also make sense to update your own documentation ;-). |
@luke-z agree with you. @SwitzerChees Could you create an issue about this defect? I can fix it for the next version. |
@SwitzerChees I copied most of this issue and create a new one as @tugcekucukoglu asked for: #6100 |
@SamuelWei that's great thank you 👍🏼 |
Describe the bug
Properties like id or name are not passed through anymore to the native rendered input of type text.
The problem can be reproduced or seen directly in the official documentation:
V4 Documentation (https://primevue.org/inputmask/):
The rendered native input element is missing the id="phone" prop:

V3 Documentation (https://v3.primevue.org/inputmask/):
The rendered native input element has the id="phone" prop:

This problem not only exists on the official documentation website but also when I use the component directly in my own application.
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-yzbded?file=src%2FApp.vue
PrimeVue version
4.0.0
Vue version
4.x
Language
TypeScript
Build / Runtime
Nuxt
Browser(s)
No response
Steps to reproduce the behavior
use InputMask component
define id or name property in the input mask

check the rendered html output and check if they are missing.

Expected behavior
The same behaviour like on V3 and as described in the following part of the documentation (https://primevue.org/inputmask/#accessibility):
The text was updated successfully, but these errors were encountered: