Open micvm opened 3 months ago
Just ran into this issue myself, I had to do the following:
:pt="{ input: { root: { style: 'width: 4rem', class: 'text-center' } } }"
The documentation is not clear about this at all. I only figured this out by looking at how the presets were styling the component :/
Thanks for sharing this. Especially because it worked in the previous version and the documentation at https://v4.primevue.org/inputnumber/ seems to be the same as for v3.
Gosh, PrimeVue team seems to be just fond of adding breaking changes without even any documentation about them.
Thanks for sharing this. Especially because it worked in the previous version and the documentation at https://v4.primevue.org/inputnumber/ seems to be the same as for v3.
Doesn't work in v3.53.0 neither..
Describe the bug
In primevue version 4, passthrough attributes for the
input
segment (e.g.class
orstyle
) are ignored even if the documentation says this is supported. Forroot
it works as expected.Reproducer
https://stackblitz.com/edit/primevue-create-vue-typescript-issue-template-rrhafz?file=src%2FApp.vue
PrimeVue version
4.0.0-beta.1
Vue version
3.x
Language
TypeScript
Build / Runtime
TypeScript
Browser(s)
No response
Steps to reproduce the behavior
:pt="{ input: { style: 'width: 4rem', class: 'text-center' } }"
InputNumber
does not contain any of the listed styles or classes.root
instead ofinput
and you will see thediv
of the component having them.Expected behavior
The resulting DOM should have under
style
andclass
the data inserted as passthrough option.